2018-08-02 04:53:31 +03:00
|
|
|
type Optional a = Some a | None
|
|
|
|
|
|
|
|
effect Abort where
|
|
|
|
Abort : forall a . () -> {Abort} a
|
|
|
|
|
|
|
|
effect Abort2 where
|
|
|
|
Abort2 : forall a . () -> {Abort2} a
|
|
|
|
Abort2' : forall a . () -> {Abort2} a
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
app : Optional Int
|
2018-08-02 04:53:31 +03:00
|
|
|
app = Optional.Some 3
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
app' : Optional Int
|
2018-08-02 04:53:31 +03:00
|
|
|
app' = 3
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
arrow : Int -> Int -> Int
|
2018-08-02 04:53:31 +03:00
|
|
|
arrow a = 3
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
effect' : Nat -> { Abort } Int
|
2018-08-02 04:53:31 +03:00
|
|
|
effect' n = Abort2.Abort2 ()
|
|
|
|
|
|
|
|
id : forall a . a -> a
|
|
|
|
id x = 3
|
|
|
|
|
|
|
|
f2 : forall a . a -> a -> a
|
|
|
|
f2 x = x
|
|
|
|
|
|
|
|
const : forall a b . a -> b -> a
|
|
|
|
const a b = 3
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
y : (Optional Int)
|
2018-08-02 04:53:31 +03:00
|
|
|
y = 3
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
z' : (Optional Int, Optional Text, Optional Float)
|
2018-08-02 04:53:31 +03:00
|
|
|
z' = (None, 3)
|
|
|
|
|
2018-09-24 20:36:13 +03:00
|
|
|
z : (Optional Int, Optional Text, Optional Float)
|
2018-08-02 04:53:31 +03:00
|
|
|
z = 3
|
|
|
|
|
|
|
|
x : ()
|
|
|
|
x = 3
|
|
|
|
|
2018-08-03 17:43:08 +03:00
|
|
|
()
|