modules & functional dependencies?
Iavor S. Diatchki
diatchki@cse.ogi.edu
Mon, 10 Dec 2001 15:18:45 -0800
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: 8bit
hi
i seem to have stumbled upon a bug which somehow seems to be realted to
the module system and functional dependencies. attached are four files
(sorry about that, but it seems to happen when the class and instance are in
different modules), 2 files per example.
when Bug1 is loaded, no error is reported (although it should have been).
if i edit the file (say just add a blank line) using the :e feature, then an
error is reported, but seems like the wrong error - it says
ERROR "Bug1.hs":6 - Illegal type in class constraint
while if i just move the class to the same module, i get the correct error
ERROR "Bug1.hs":8 - Undefined type variable "t'"
(GHC comes up with this same error)
when Bug2 is loaded i get the error:
INTERNAL ERROR: inheritFundeps - predicate failed to match it's own head!
although these messages dont seem related it seems like their cause is
common. i am using the vesrion of hugs from the CVS from about 2 weeks ago
(doesnt seem to have a number it just says YYMMDD)
bye
iavor
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV
Content-Type: text/x-c++;
charset="iso-8859-15";
name="Bug2a.hs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Bug2a.hs"
bW9kdWxlIEJ1ZzJhIHdoZXJlCgpjbGFzcyBNb25hZCBtID0+IEMgbSB0IGUgfCB0IC0+IGUgd2hl
cmUKICAgIHQgOjogdCAtPiBtIGUKCg==
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV
Content-Type: text/x-c++;
charset="iso-8859-15";
name="Bug1a.hs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Bug1a.hs"
bW9kdWxlIEJ1ZzFhIHdoZXJlCgpjbGFzcyBFcSBtID0+IEMgbSB0IGUgfCB0IC0+IGUgd2hlcmUK
ICAgIHQgOjogdCAtPiAobSxlKQoK
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV
Content-Type: text/x-java;
charset="iso-8859-15";
name="Bug2.hs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Bug2.hs"
aW1wb3J0IEJ1ZzJhCgpjbGFzcyBDIE1heWJlIHQgdCcgPT4gQnVnMSB0IHdoZXJlCiAgICBnIDo6
IHQgLT4gQm9vbAoKCnstCklOVEVSTkFMIEVSUk9SOiBpbmhlcml0RnVuZGVwcyAtIHByZWRpY2F0
ZSBmYWlsZWQgdG8gbWF0Y2ggaXQncyBvd24gaGVhZCEKLX0KCgo=
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV
Content-Type: text/x-java;
charset="iso-8859-15";
name="Bug1.hs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Bug1.hs"
aW1wb3J0IEJ1ZzFhCgoKY2xhc3MgQyBJbnQgdCB0JyA9PiBCdWcxIHQgd2hlcmUKICAgIGcgOjog
dCAtPiBCb29sCgoKey0KbG9hZGluZyB0aGUgZmlsZSBnaXZlcyBubyBlcnJvciwgYnV0IGFmdGVy
IGVkaXRpbmcgaXQKYW4gZXJyb3IgaXMgcmVwb3J0ZWQgZXZlbiB0aG91Z2ggbm8gc2lnbmlmaWNh
bnQgY2hhbmdlIGlzIG1hZGUKKGkuZS4gZGVsZXRlIGEgYmxhbmsgbGluZSkKRVJST1IgIkIuaHMi
OjMgLSBJbGxlZ2FsIHR5cGUgaW4gY2xhc3MgY29uc3RyYWludAotfQoKCg==
--------------Boundary-00=_93I5B4RR2EHAY8HUL9MV--