git.iko.soy/rowtype-yoga/purescript-native
on cf43a16 help sign in
34 lines 572 B history raw
1module A
2 ( Tuple(..)
3 , type (/\)
4 , (/\)
5 , Natural
6 , type (~>)
7 ) where
9 data Tuple a b = Tuple a b
11 infixl 6 Tuple as /\
12 infixl 6 type Tuple as /\
14 type Natural f g = ∀ a. f a → g a
16 infixr 0 type Natural as ~>
18 tup ∷ ∀ a b. a → b → b /\ a
19 tup a b = b /\ a
21 tupX ∷ ∀ a b c. a /\ b /\ c → c
22 tupX (a /\ b /\ c) = c
24module Main where
26 import A (type (~>), type (/\), (/\))
28 natty ∷ ∀ f. f ~> f
29 natty x = x
31 swap ∷ ∀ a b. a /\ b → b /\ a
32 swap (a /\ b) = b /\ a
34 main = Control.Monad.Eff.Console.log "Done"