Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. -- There are two ways to declare stuff
  2. -- 1.
  3. data Person = Person String Int deriving (Eq, Show)
  4.  
  5. -- 2.
  6. type HumanName = String
  7. type HumanAge = Int
  8. data Human = Human HumanName HumanAge deriving (Eq, Show)
  9.  
  10. -- 3.
  11. data Individual = Individual { name :: String, age :: Int } deriving (Eq, Show)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement