Yur
This commit is contained in:
parent
dac675a417
commit
0fd8a9bc74
3 changed files with 5 additions and 28 deletions
|
|
@ -57,7 +57,6 @@ executable language
|
|||
Compiler
|
||||
Renamer.Renamer
|
||||
ReportForall
|
||||
TreeConverter
|
||||
Desugar.Desugar
|
||||
|
||||
hs-source-dirs: src
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
--
|
||||
--
|
||||
|
||||
|
|
@ -1,15 +1,6 @@
|
|||
data Two where
|
||||
This : Two
|
||||
That : Two
|
||||
main = sigma 0 10
|
||||
|
||||
main = reval (eval This)
|
||||
|
||||
eval x = case x of
|
||||
That => That
|
||||
This => eval That
|
||||
|
||||
reval x = case x of
|
||||
This => 123
|
||||
That => 123
|
||||
|
||||
-- test comment
|
||||
sigma : Int -> Int -> Int
|
||||
sigma from to = case from == to of
|
||||
True => from
|
||||
False => to + sigma from (to - 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue