No instance for (Monad ((->) Integer))

Chad Scherrer chad.scherrer at gmail.com
Mon Feb 5 14:57:44 EST 2007


I'm getting this error in ghci, and I think it should typecheck just fine.

Prelude> let fs = [(+2), (*4)]
Prelude> :t fs
fs :: [Integer -> Integer]
Prelude> :t sequence fs

<interactive>:1:0:
    No instance for (Monad ((->) Integer))
      arising from use of `sequence' at <interactive>:1:0-10
    Possible fix:
      add an instance declaration for (Monad ((->) Integer))

I'm using ghc-6.6-3 on Ubuntu edgy, installed as described on Pupeno's
web site (http://pupeno.com/2006/12/17/unstable-packages-on-ubuntu/)

Could something be installed incorrectly, or am I just misreading the type info?

Thanks,

Chad


More information about the Glasgow-haskell-users mailing list