Fixed simple pattern matching.

This commit is contained in:
Samuel Hammersberg 2023-03-27 13:40:18 +02:00
parent 582747a997
commit bd3cf3c3f1
4 changed files with 17 additions and 11 deletions

View file

@ -1,7 +1,7 @@
data Maybe () where {
Nothing : Maybe ()
Just : Int -> Maybe ()
};
};
-- fmap : (Int -> Int) -> Maybe () -> Maybe () ;
-- fmap f ma = case ma of {
@ -9,10 +9,9 @@ data Maybe () where {
-- Just a => Just (f a) ;
-- };
main = case (Just 5) of {
main = case (Just 10) of {
Just a => a ;
Nothing => 1 ;
_ => 66 ;
};
-- pure : Int -> Maybe () ;