data Date = -- name of type
  DMY       -- name of constructor
    Int     -- day
    Int     -- month
    Integer -- year
  deriving Show

data Person = -- name of type
  Person      -- constructor name can be same as type name 
    String    -- first name
    String    -- last name
    Bool      -- married
    Date      -- birthday
  deriving Show

today :: Date
today = DMY 19 10 2026

myself, myself2, myself3 :: Person
myself = Person "Rene" "Thiemann" True today 
myself2 = Person "Rene" "Thiemann" True (DMY 19 10 2026)
myself3 = Person "Rene" "Thiemann" (5 > 3) (DMY 19 (length "0123456789") 2026)
{- 
not working: 
myself4 = Person ("Rene", "Thiemann", True, DMY (19, 10, 2026))
myself5 = Person "Rene" "Thiemann" True DMY 19 10 2026
-}

data Brand = Audi | BMW | Fiat | Lamborghini deriving Show 
data Vehicle = 
    Car Brand Double -- horsepower
  | Bicycle
  | Truck Int -- number of wheels
  deriving Show

data Expr = 
    Number Integer
  | Variable String
  | Plus Expr Expr
  | Negate Expr
  deriving Show

data List = 
    Empty
  | Cons Integer List
  deriving Show

exampleExpression :: Expr
exampleExpression = Plus 
  (Negate 
     (Plus 
        (Number 5) 
        (Variable "x"))) 
  (Number 3)
