We got a code (please refer to the attached lhs file) that uses type
families and type classes very cleverly.  We don't know who wrote
itbecause this was a contribution of an anonymous reviewer on our paper,
which we are still revising. http://kyagrd.dyndns.org/wiki/SharedSubtypes
Although we learned a lot from this code, we still have unsolved
question about this code.

The problem is, we are still not sure whether this code actually type
checks in any GHC version, and we are not even sure whether this should
type check or not as it is.

Have you first, before you turn to GHC< considered whether this code should be well-typed in any type system?

Review3.lhs:67:29:
   Could not deduce (Expandable (Tuple (Map ((,) t2) ys)))
     from the context (xs ~ t2 ::: ts2, Expandable t2)
     arising from a use of `:::' at Review3.lhs:67:29-59

At first sight, it looks like this constraint

        Expandable (Tuple (Map ((,) t2) ys))
is indeed one that's required to hold in order to make the code well-typed. Do you agree?

Yet I see no instance of Expandable for Tuple. So why do you think this constraint should hold anyway?

Tom


--
Tom Schrijvers

Department of Computer Science
K.U. Leuven
Celestijnenlaan 200A
B-3001 Heverlee
Belgium

tel: +32 16 327544
e-mail: tom.schrijv...@cs.kuleuven.be
url: http://www.cs.kuleuven.be/~toms/

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to