[Haskell-cafe] Confused about type seen in the wild

Andres Löh andres at well-typed.com
Thu Apr 10 18:37:49 UTC 2014


And even more:

Prelude> let test :: (Eq a, a, Eq b, b) => a; test = const
Prelude> :t test
test :: (Eq a, Eq b) => a -> b -> a
Prelude> let test :: (Eq a, Eq b, a, b) => a; test = const
Prelude> :t test
test :: (Eq a, Eq b) => a -> b -> a
Prelude> let test :: (a, b, Eq a, Eq b) => a; test = const

<interactive>:19:35:
    Predicate `a' used as a type
    In the type signature for `test': test :: (a, b, Eq a, Eq b) => a

Cheers,
  Andres

-- 
Andres Löh, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com

Registered in England & Wales, OC335890
250 Ice Wharf, 17 New Wharf Road, London N1 9RF, England


More information about the Haskell-Cafe mailing list