type Pair = (Char, Char) -- alias unui tip existent f :: Pair -> Pair f (x, y) = ('a', 'b') v :: Pair v = f ('c', 'd') -- creez un tip nou de date, care se numește List (și care este construit peste alt tip de date, a) data List a = Nil -- costructor de date nular | Cons a (List a) -- constructor de date binar, pot construi date noi din tipul list, pornind de la o valoare de tip a și o valoare de tip List a deriving Show {- -- ca și cum aș fi scris Cons :: a -> (List a) -> (List a) Cons x lista = Cons x lista -} newtype Graph a = G [(a, a)] -- hibrid între data și type -- construiește un tip nou -- https://stackoverflow.com/questions/2649305/why-is-there-data-and-newtype-in-haskell#2650051