
13 May
2013
13 May
'13
6:53 p.m.
On Mon, May 13, 2013 at 11:43:41PM +0100, Tom Ellis wrote:
On Mon, May 13, 2013 at 02:08:26PM -0800, Christopher Howard wrote:
instance Integral a => Coord2 (CircAppr a) where
coords2 (CircAppr divns ang rad) = let dAng = 2 * pi / (fromIntegral divns) in let angles = map (* dAng) [0..divns] in undefined -- To be coded...
Your definition of "angles" forces "dAng" to be of type "a". Then in order to define "dAng" as the result of a "/" there must be a "Fractional" instance for "a".
You probably want let angles = map ((* dAng) . fromInteger) [0..divns] in ... instead.