[Haskell-cafe] nice simple problem for someone struggling....

Nicholls, Mark Nicholls.Mark at mtvne.com
Fri Dec 21 12:31:47 EST 2007


Yes sorry....but this still fails with....

 

"`numberType1' is a rigid type variable bound by"

 

________________________________

From: Brent Yorgey [mailto:byorgey at gmail.com] 
Sent: 21 December 2007 17:29
To: Nicholls, Mark
Cc: Jules Bean; haskell-cafe at haskell.org
Subject: Re: [Haskell-cafe] nice simple problem for someone
struggling....

 

 

	
	"class ShapeInterface shape where
	       area :: shape->Int"

	now looks dubious....I want it to be something like
	
	"class ShapeInterface shape where
	       area :: Num numberType => shape->Int" ?


Rather, I think you probably want

class ShapeInterface shape where
    area :: Num numberType => shape -> numberType

-Brent

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071221/f8431dd0/attachment.htm


More information about the Haskell-Cafe mailing list