|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000055||mercury||Bug||public||2008-03-29 02:38||2008-06-02 15:06|
|Target Version||Fixed in Version|
|Summary||0000055: typeclass instances for e.g. bag(T) no longer work|
|Description||with rotd-2008-03-27, the attached file bug.m gives the following error:|
bug.m:001: Warning: interface for module `bug' does not export anything.
bug.m:011: In instance declaration for `bug.fooable((bag.bag(V)))':
bug.m:011: the first arg contains a type variable which is used in another
with rotd-2007-08-13, the same code was compilable and worked as expected.
When I tried to avoid the type variable by instantiating the typeclass for eg. bag(string) specifically, the recent ROTD gives me this error:
testhugemap.m:047: In instance declaration for
testhugemap.m:047: the first arg is a type whose first arg is not a variable
What is the correct way of instantiating such typeclasses?
|Tags||No tags attached.|
The basic problem is the following restriction from the
"The types in an instance declaration must not be abstract
types which are elsewhere defined as equivalence types."
bag/1 is an abstract type that happens to be defined as an
The error message is just plain wrong, however.
I have changed the definition of bag/1 so that it can be used in type class instances --
the issue with the error message is still a bug though.
|2008-03-29 02:38||obo||New Issue|
|2008-03-29 02:38||obo||File Added: bug.m|
|2008-03-29 12:00||mark||Note Added: 0000096|
|2008-03-29 12:02||mark||Status||new => confirmed|
|2008-06-02 15:06||juliensf||Note Added: 0000103|