tcfail127.hs:3:8: Illegal polymorphic or qualified type: Num a => a -> a Perhaps you intended to use -XImpredicativeTypes In the type signature for `foo': foo :: IO (Num a => a -> a)