summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--changelog.md1
-rw-r--r--lib/std/paths.nim3
2 files changed, 4 insertions, 0 deletions
diff --git a/changelog.md b/changelog.md
index c010714fa..a137b3e42 100644
--- a/changelog.md
+++ b/changelog.md
@@ -36,6 +36,7 @@ slots when enlarging a sequence.
 - ORC: To be enabled via `nimOrcStats` there is a new API called `GC_orcStats` that can be used to query how many
   objects the cyclic collector did free. If the number is zero that is a strong indicator that you can use `--mm:arc`
   instead of `--mm:orc`.
+- A `$` template is provided for `Path` in `std/paths`.
 
 [//]: # "Deprecations:"
 
diff --git a/lib/std/paths.nim b/lib/std/paths.nim
index b488d2fea..ac2e5cea4 100644
--- a/lib/std/paths.nim
+++ b/lib/std/paths.nim
@@ -25,6 +25,9 @@ export ReadDirEffect, WriteDirEffect
 type
   Path* = distinct string
 
+template `$`*(x: Path): string =
+  string(x)
+
 func `==`*(x, y: Path): bool {.inline.} =
   ## Compares two paths.
   ##