From 0ff0a23c8c7425b0d56b95e318c2087e74cb6605 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Jun 2021 16:34:36 -0400 Subject: Get all scheme code compiling with Guile --- Biz/Namespace.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Biz/Namespace.hs') 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" -- cgit v1.2.3