added printTree for monomorphizer
This commit is contained in:
parent
cf12c3443d
commit
ba832ba288
3 changed files with 178 additions and 76 deletions
|
|
@ -1,20 +1,5 @@
|
|||
data List () where {
|
||||
Nil : List ()
|
||||
Cons : Int -> List () -> List ()
|
||||
};
|
||||
id x = x;
|
||||
|
||||
main = case Nil of {
|
||||
Nil => 0 ;
|
||||
Cons a _ => a ;
|
||||
};
|
||||
const x y = x ;
|
||||
|
||||
-- length : List () -> Int ;
|
||||
-- length xs = case xs of {
|
||||
-- Nil => 0;
|
||||
-- Cons _ xs => 1 + length xs ;
|
||||
-- };
|
||||
|
||||
--sum xs = case xs of {
|
||||
-- Nil => 0 ;
|
||||
-- Cons a xs => a + main xs ;
|
||||
--};
|
||||
main = const (id 0) (id 'a') ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue