ghci> :t ([1,2,3], "abc") ([1,2,3], "abc") :: Num a => ([a], String) ghci> (,) 1 2 -- constructor de date (1,2) ghci> :t f f :: (a, [b]) -> a ghci> :i (,) type (,) :: * -> * -> * -- constructor de tip data (,) a b = (,) a b -- constructor de date -- Defined in `GHC.Tuple.Prim' ... ghci> :t [] -- constructor de tip [] :: [a] ghci> :t g g :: [Integer] -> Integer -- implementare care întoarce lista ghci> search 3 d "c" ghci> search 2 d "bd" ghci> search 2 d 'b' ghci> search 3 d 'c' ghci> search 5 d *** Exception: Prelude.head: empty list -- impelmentare care întoarce Maybe a ghci> search 3 d Just 'c' ghci> search 5 d Nothing ghci> :i Maybe type Maybe :: * -> * data Maybe a = Nothing | Just a -- Defined in `GHC.Maybe' ... ghci> :k Bool Bool :: * ghci> :k String String :: * ghci> :k [] [] :: * -> * ghci> :k [a] [a] :: * ghci> :k (,) (,) :: * -> * -> * ghci> :k (,,,) (,,,) :: * -> * -> * -> * -> * ghci> :k (->) (->) :: * -> * -> * ghci> :t elem elem :: (Foldable t, Eq a) => a -> t a -> Bool ghci> elem 5 [1,2,3,4,5,6] True ghci> :t elem elem :: (Foldable t, Eq a) => a -> t a -> Bool