Can we offer ~ without GADTs or type families?

It seems to me that equality constraints could potentially be supported by an implementation with neither GADTs nor type families. Type families don't really seem to have much to do with it, and GADTs are strictly heavier (GADTs ~= ExistentialQuantification + TypeEquality). Could we get a separate LANGUAGE pragma just for equality constraints?

On 05/08/16 19:08, David Feuer wrote:
It seems to me that equality constraints could potentially be supported by an implementation with neither GADTs nor type families. Type families don't really seem to have much to do with it, and GADTs are strictly heavier (GADTs ~= ExistentialQuantification + TypeEquality).
Could we get a separate LANGUAGE pragma just for equality constraints?
I suggested this in #10431 [1], where there is some discussion of the implications. I still think it is a good idea, and I don't think the implementation would be very difficult. All the best, Adam [1] https://ghc.haskell.org/trac/ghc/ticket/10431 -- Adam Gundry, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

As a user who frequently uses ~, but doesn't need the rest of GADTs or
TypeFamilies, I'd really like to see a TypeEqualities extension!
Eric
On Fri, Aug 5, 2016 at 3:27 PM, Adam Gundry
On 05/08/16 19:08, David Feuer wrote:
It seems to me that equality constraints could potentially be supported by an implementation with neither GADTs nor type families. Type families don't really seem to have much to do with it, and GADTs are strictly heavier (GADTs ~= ExistentialQuantification + TypeEquality).
Could we get a separate LANGUAGE pragma just for equality constraints?
I suggested this in #10431 [1], where there is some discussion of the implications. I still think it is a good idea, and I don't think the implementation would be very difficult.
All the best,
Adam
[1] https://ghc.haskell.org/trac/ghc/ticket/10431
-- Adam Gundry, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/ _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
participants (3)
-
Adam Gundry
-
David Feuer
-
Eric Crockett