summaryrefslogtreecommitdiff
path: root/Biz/Namespace.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-06-07 16:34:36 -0400
committerBen Sima <ben@bsima.me>2021-11-26 13:47:35 -0500
commit0ff0a23c8c7425b0d56b95e318c2087e74cb6605 (patch)
treea5bfbaf70fa6a73c2e4b083cdefa5b2228153d98 /Biz/Namespace.hs
parent310275abdc61130c8cc77f7827163f136d57b63f (diff)
Get all scheme code compiling with Guile
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"