http://www-users.cs.york.ac.uk/~ndm/projects/winhugs.php
Yes, please try that out. When WinHugs is ready, there will be a Hugs
release.
okay then, on to bugs:-)
with the following code
-- | field selection
infixl #?
class Select label val rec | label rec -> val where
(#?) :: rec -> label -> val
instance Select label val ((label,val),r) where
((_,val),_) #? label = val
instance Select label val r => Select label val (l,r) where
(_,r) #? label = r #? label
hugs -98 +o complains [Neil: would it be possible to add a WinHugs option
for switching to copy&past *without formatting*?]:
ERROR file:.\Dilemma.hs:33 - Instances are not consistent with dependencies
*** This instance : Select a b (c,d)
*** Conflicts with : Select a b ((a,b),c)
*** For class : Select a b c
*** Under dependency : a c -> b
but according to the resolution of overlapping instances, the offending
instances shouldn't even exist, right? in other words, after resolution,
there are no overlaps left, hence no two ways to select an instance.
whenever the two instance definitions overlap, the first one is chosen,
so the dependency is maintained.
or am I missing something? [ghci accepts these definitions]
Claus
_______________________________________________
Hugs-Bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hugs-bugs