•Data
Term a
• = Int
Int where a=Int
• | Bool
Bool where a=Bool
• | Plus
(Term Int) (Term Int) where a=Int
•
| Less (Term Int) (Term Int) where a=Bool
•
| If (Term Bool) (Term a) (Term a)
•
•Int
:: forall a.(a=Int) => Int -> Term a
•
•We can specialize this kind
of type to the ones we want
•
•Int
:: Int -> Term Int
•Bool
:: Bool -> Term Bool
•Plus
:: Term Int -> Term Int -> Term Int
•Less ::
Term Int -> Term Int -> Term Bool
•If
:: Term Bool -> Term a -> Term a -> Term a