It's a bug all right. The definition of A should be rejected. It's not legal H98
Will fix. Thanks for the report Simon | -----Original Message----- | From: Jorge Adriano [mailto:[EMAIL PROTECTED]] | Sent: 17 April 2002 18:26 | To: [EMAIL PROTECTED] | Subject: Bugs? | | | I've sent this msg to the ghc main mailing list, but this one is more | adequate. I've tried this with both ghc 5.02.3/5.02.2, SuSE | RPMs. Thanks in advance, J.A. | | -------------------------------------------------------------- | ----------------- | [1] Bug1? | This declaration: | > data A = (,) Int Int | is accepted by ghci. Is this behaveour correct, | 1. It kind of shadows (,) is defined in PrelTup meaning that | you can no longer | use (,) prefix to refer to tuples - like (,) 1 2. | 2. Seems to me like (,) is not correct syntax for a consym as | defined in the | H98 Report so we shouldn't be able to redefine it. | | Note: didn't check any other interpreter/compiler. | | | [2] Bug2? | - Step 1 | Load this in ghci, | ----------------------- | module Test where | data C = C ((,) Int Int) | | data A = (,) !Int !Int | h :: A | h = (,) 1 2 | | {- | f :: C | f = C ((,) 3 4) | -} | ------------------------ | - Step 2 | Uncomment the f function. (you'll get an error) | | - Step 3 | To get rid of the error comment out the 'data A' declaration | and function 'h'. | | Now you should get this error message: | ------------------------------------------------- | Failed to find interface decl for `Teste.A' | from module `Teste' | ------------------------------------------------- | Quiting ghci and then reloading the file works fine. | | J.A. | | | | _______________________________________________ | Glasgow-haskell-bugs mailing list | [EMAIL PROTECTED] | http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs | _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs