summaryrefslogtreecommitdiff
path: root/Biz/Namespace.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Namespace.hs')
-rw-r--r--Biz/Namespace.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Biz/Namespace.hs b/Biz/Namespace.hs
index 398841e..316896a 100644
--- a/Biz/Namespace.hs
+++ b/Biz/Namespace.hs
@@ -8,6 +8,7 @@ module Biz.Namespace
fromPath,
toPath,
toHaskellModule,
+ toSchemeModule,
match,
)
where
@@ -57,3 +58,8 @@ toPath (Namespace parts ext) =
joinWith "/" parts
<> "."
<> lowercase (show ext)
+
+toSchemeModule :: Namespace -> String
+toSchemeModule (Namespace parts Scm) = "(" ++ joinWith " " parts ++ ")"
+toSchemeModule (Namespace _ ext) =
+ panic <| "can't convert " <> show ext <> " to a Scheme module"