On Thu, Apr 10, 2014 at 10:21 AM, Kim-Ee Yeoh <ky3@atamo.com> wrote:
No problems here:

# ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> let whee :: Show a => Eq a => a => Bool; whee x = x == x && null (show x)
Prelude> :t whee
whee :: (Eq a, Show a) => a -> Bool

It seems to be an issue with giving everything on a single line:

$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude ë> let whee x = x == x && null (show x) :: Show a => Eq a => a => Bool

<interactive>:2:14:
    Couldn't match expected type `a -> Bool' with actual type `Bool'
    In the expression:
        x == x && null (show x) :: Show a => Eq a => a => Bool
    In an equation for `whee':
        whee x = x == x && null (show x) :: Show a => Eq a => a => Bool

I see now to make it work as a one liner I could do it this way:
Prelude ë> :t (\x -> x == x && null (show x)) :: Show a => Eq a => a => Bool
(\x -> x == x && null (show x)) :: Show a => Eq a => a => Bool
  :: (Eq a, Show a) => a -> Bool

Thanks!