[Haskell-cafe] Circular enums

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sat Feb 2 18:47:17 EST 2008

On Feb 2, 2008, at 18:41 , Ben Butler-Cole wrote:

>     No instance for (Bounded a)
>       arising from use of `maxBound' at Hbot.hs:6:34-41
> (...)
> My (clearly flawed) understanding of the signature I've specified  
> for 'turn' means *exactly* that a is Bounded.

The problem is that the scope of a is the type signature; it does  
*not* extend to the definition.

You can try omitting the type on maxBound and minBound, or you can  
enable the scoped type variables extension ( http://www.haskell.org/ 
type-variables ).

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list