mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-09-11 11:46:57 +03:00
9 lines
268 B
Haskell
9 lines
268 B
Haskell
{-# LANGUAGE TypeOperators #-}
|
|
|
|
data Unit = Unit -- 1
|
|
data Empty -- 0
|
|
data (a * b) = Product a b -- a * b
|
|
data (a + b) = Inl a | Inr b -- a + b
|
|
data Exp a b = Exp (a -> b) -- a^b
|
|
data Rec f = Rec (f (Rec f)) --
|