-- read http://learnyouahaskell.com/types-and-typeclasses :t compare compare :: Ord a => a -> a -> Ordering Prelude> compare 3 4 LT Prelude> compare 3 3 EQ Prelude> compare 3 2 GT Prelude> show 3 "3" Prelude> show True "True" Prelude> :t show show :: Show a => a -> String Prelude> read "True" :1:1: Ambiguous type variable `a0' in the constraint: (Read a0) arising from a use of `read' Probable fix: add a type signature that fixes these type variable(s) In the expression: read "True" In an equation for `it': it = read "True" Prelude> read "True" :: Boolean :1:16: Not in scope: type constructor or class `Boolean' Prelude> read "True" :: Bool True Prelude> :t read read :: Read a => String -> a Prelude> 3.2 + length [1,2,3] :1:1: No instance for (Fractional Int) arising from the literal `3.2' Possible fix: add an instance declaration for (Fractional Int) In the first argument of `(+)', namely `3.2' In the expression: 3.2 + length [1, 2, 3] In an equation for `it': it = 3.2 + length [1, 2, 3] Prelude> 3.2 + fromIntegral (length [1,2,3] ) 6.2 Prelude> :t fromIntegral fromIntegral :: (Num b, Integral a) => a -> b