[ghc-steering-committee] Proposal: Binding existential type variables (#96)
Joachim Breitner
mail at joachim-breitner.de
Wed Mar 28 15:42:37 UTC 2018
Hi,
Am Mittwoch, den 28.03.2018, 16:37 +0100 schrieb Roman Leshchinskiy:
> On Tue, Mar 27, 2018 at 6:24 AM, Joachim Breitner <mail at joachim-breitner.de> wrote:
> > 2. The distinction between existentials and universals is oddly abrupt.
>
> This is a good point. In addition to what Joachim said, universals
> can also depend on existentials which I find weird.
>
> As an aside, here is one corner case which I don't think is handled
> in the proposal:
>
> data T a where
> MkT :: forall a. T a
>
> With -XPolyKinds, the type inferred for T is forall k (a :: k). T a.
> Now, k is an existential but can it be bound in a pattern? The
> proposal only mentions 2 cases: no forall and a forall that mentions
> all type variables and neither applies here.
good point – the future of this should be addressed by
https://github.com/ghc-proposals/ghc-proposals/pull/103
but it would be clear to be explicit in how this will be handled in #96
until #103 is fully in place.
Cheers,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180328/331a2390/attachment.sig>
More information about the ghc-steering-committee
mailing list