This commit is contained in:
sebastianselander 2023-05-16 17:24:51 +02:00
parent dac675a417
commit 0fd8a9bc74
3 changed files with 5 additions and 28 deletions

View file

@ -57,7 +57,6 @@ executable language
Compiler Compiler
Renamer.Renamer Renamer.Renamer
ReportForall ReportForall
TreeConverter
Desugar.Desugar Desugar.Desugar
hs-source-dirs: src hs-source-dirs: src

View file

@ -1,13 +0,0 @@
module TreeConverter where
--import qualified Grammar.Abs as G
--import qualified TypeChecker.TypeCheckerIr as T
--
--convertToTypecheckerIR :: G.Program -> Either String T.Program
--convertToTypecheckerIR (G.Program defs) = T.Program (map convertDef defs)
--
--convertDef :: G.Bind -> T.Bind
--convertDef (G.Bind name t _ args exp) = T.Bind (name, t) (map (\i -> (i, T.TMono "Int"))) (convertExp exp)
--
--

View file

@ -1,15 +1,6 @@
data Two where main = sigma 0 10
This : Two
That : Two
main = reval (eval This) sigma : Int -> Int -> Int
sigma from to = case from == to of
eval x = case x of True => from
That => That False => to + sigma from (to - 1)
This => eval That
reval x = case x of
This => 123
That => 123
-- test comment