Jorge Adriano jadrian@mat.uc.pt
Wed, 17 Apr 2002 03:15:26 +0100

[1] Bug1?
This declaration:
> A =3D (,) Int Int
is accepted by ghci. Is this behaveour correct,
1. It kind of shadows (,) is defined in PrelTup meaning that you can no l=
use (,) prefix to refer to tuples - like (,) 1 2.
2. Seems to me like (,) is not correct syntax for a consym as defined in =
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 =3D C ((,) Int Int)

data A =3D (,) !Int !Int=20
h :: A
h =3D  (,) 1 2

f :: C
f =3D C ((,) 3 4)
- Step 2
Uncomment the f function. (you'll get an error function)

- Step 3
To get rid of the error comment out the 'data A' declaration and function=

Now you should get this error message:
    Failed to find interface decl for `Teste.A'
    from module `Teste'

[3] Strict Pairs question
I really miss them :-)
I know I can do something like

data A a b=3D A !a !b
But then you can't use zips fst etc etc...
One possible solution would be to add some Class Pair, with default insta=
for these functions. Is this a bad idea for any particular reason?

It would also be nice to be able to generalize the idea syntatic sugar fo=
standar tuples and be able to define constructors like, say
(:,:) and (#:, , :#) etc. Is this feasable?