2020-05-19 20:25:18 +03:00
|
|
|
1/1: Building CaseBlock (CaseBlock.idr)
|
2020-08-18 15:36:34 +03:00
|
|
|
Main> Main.foo : (x : Nat) -> (case x of {0 => Nat -> Nat; S k => Nat})
|
2020-05-19 20:25:18 +03:00
|
|
|
Main> Prelude.elem : Eq a => a -> List a -> Bool
|
|
|
|
elem x [] = False
|
2020-07-08 02:55:55 +03:00
|
|
|
elem x (y :: ys) = (x == y) || Delay (elem x ys)
|
2020-05-25 15:14:51 +03:00
|
|
|
Main> PrimIO.io_bind : (1 _ : IO a) -> (1 _ : (a -> IO b)) -> IO b
|
2020-08-04 14:51:57 +03:00
|
|
|
io_bind (MkIO fn) k = MkIO (\1 w => let MkIORes x' w' = fn w in let MkIO res = k x' in res w')
|
2020-05-19 20:25:18 +03:00
|
|
|
Main> Bye for now!
|