A lot of small changes, added better error messages for bugs mainly

This commit is contained in:
sebastianselander 2023-05-11 18:37:03 +02:00
parent 5e1c81beb7
commit 6260dc2c41
10 changed files with 37 additions and 39 deletions

View file

@ -6,13 +6,6 @@ data Maybe a where
Nothing : Maybe a
Just : a -> Maybe a
data Pair a b where
Pair : a -> b -> Pair a b
data List a where
Nil : List a
Cons : a -> List a -> List a
empty = Empty
singleton x = Node Empty x Empty
@ -35,7 +28,3 @@ merge tree1 tree2 = case tree1 of
Empty => tree2
insert x tree = merge (singleton x) tree
main = case peek (insert 1 (insert 2 (insert 3 (singleton 4)))) of
Nothing => (0 - 1)
Just x => x

View file

@ -42,13 +42,3 @@ descList from to = case to < from of
main = let list = (5 :: (2 :: (8 :: (9 :: (6 :: (0 :: (1 :: Nil)))))))
in printStr (toStr (quicksort list))
{-
-- Program output --
0125689
In dispose
Out dispose
ExitSuccess
-}