summaryrefslogtreecommitdiff
path: root/src/compiler.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler.sml')
-rw-r--r--src/compiler.sml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index 4fa4fcc8..e8da379c 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -368,6 +368,8 @@ fun parseUrp' accLibs fname =
fun pu filename =
let
+ val filename = OS.Path.mkAbsolute {path = filename, relativeTo = OS.FileSys.getDir ()}
+
val dir = OS.Path.dir filename
fun opener () = TextIO.openIn (OS.Path.joinBaseExt {base = filename, ext = SOME "urp"})
@@ -705,7 +707,8 @@ fun parseUrp' accLibs fname =
bigLibs := libify' arg :: !bigLibs
| "path" =>
(case String.fields (fn ch => ch = #"=") arg of
- [n, v] => pathmap := M.insert (!pathmap, n, v)
+ [n, v] => ((pathmap := M.insert (!pathmap, n, OS.Path.mkAbsolute {path = v, relativeTo = dir}))
+ handle OS.Path.Path => ErrorMsg.error "Invalid 'path' directory argument")
| _ => ErrorMsg.error "path argument not of the form name=value'")
| "onError" =>
(case String.fields (fn ch => ch = #".") arg of