diff options
author | Ben Sima <ben@bsima.me> | 2021-06-07 16:34:36 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-11-26 13:47:35 -0500 |
commit | 0ff0a23c8c7425b0d56b95e318c2087e74cb6605 (patch) | |
tree | a5bfbaf70fa6a73c2e4b083cdefa5b2228153d98 /Biz/Namespace.hs | |
parent | 310275abdc61130c8cc77f7827163f136d57b63f (diff) |
Get all scheme code compiling with Guile
Diffstat (limited to 'Biz/Namespace.hs')
-rw-r--r-- | Biz/Namespace.hs | 6 |
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" |