$ ghci 01_intro_inter.hs GHCi, version 7.0.4: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. [1 of 1] Compiling Main ( 01_intro_inter.hs, interpreted ) Ok, modules loaded: Main. *Main> let x = ((1,2),(3,4)) *Main> fst x (1,2) *Main> fst fst x :1:5: Couldn't match expected type `(t1 -> t0, b0)' with actual type `(a0, b1) -> a0' In the first argument of `fst', namely `fst' In the expression: fst fst x In an equation for `it': it = fst fst x *Main> fst (fst x) 1 *Main> fst $ fst x 1 *Main> let x = ... in nth x (1,2,3) *Main> 1:2:5 :1:5: No instance for (Num [a0]) arising from the literal `5' Possible fix: add an instance declaration for (Num [a0]) In the second argument of `(:)', namely `5' In the second argument of `(:)', namely `2 : 5' In the expression: 1 : 2 : 5 *Main> :info String type String = [Char] -- Defined in GHC.Base *Main> :type "Hello" "Hello" :: [Char] *Main> :load 01_intro_inter.hs [1 of 1] Compiling Main ( 01_intro_inter.hs, interpreted ) Ok, modules loaded: Main. *Main> let mypair = (1,2) *Main> case mypair of (a,b) | a == 1 -> (a,b) (1,2) *Main> case (2,3) of (a,b) | a == 1 -> (a,b) *** Exception: :1:1-37: Non-exhaustive patterns in case *Main> map (\x y -> x + (2*y)) [1,2,3] :1:1: No instance for (Show (a0 -> a0)) arising from a use of `print' Possible fix: add an instance declaration for (Show (a0 -> a0 )) In a stmt of an interactive GHCi command: print it *Main> :type map (\x y -> x + (2*y)) [1,2,3] map (\x y -> x + (2*y)) [1,2,3] :: Num a => [a -> a] *Main> map (\f -> f 7) $ map (\x y -> x + (2*y)) [1,2,3] [15,16,17]