[Haskell-cafe] Ambiguous type signature in class declaration
robert dockins
robdockins at fastmail.fm
Wed Apr 27 13:24:47 EDT 2005
See:
http://haskell.org/hawiki/FunDeps
> > class CRank a b where
> > rank :: a -> b -> Maybe Integer -- Nothing means b is out of range
> or badly constructed
> > unrank :: a -> Integer -> Maybe b -- Nothing means rank is out of
> range
> > count :: a -> Maybe Integer -- Nothing means infinity
>
[snip]
> but all i get is
>
> ERROR "./Cafe.lhs":8 - Ambiguous type signature in class declaration
> *** ambiguous type : CRank a b => a -> Maybe Integer
> *** assigned to : count
>
> Any suggestions anyone?
>
More information about the Haskell-Cafe
mailing list