[ghc-steering-committee] Discussion on proposal #99: forall {k}

Joachim Breitner mail at joachim-breitner.de
Wed May 2 13:48:38 UTC 2018


Hi,

Am Dienstag, den 01.05.2018, 22:05 -0400 schrieb Richard Eisenberg:
> We can boil it down to one rule for these situations:
>  RULE. Braces used in type declarations affect only the types of
> terms declared within the declaration. The braces have no effect
> whatsoever on the kind of the type(s) declared.
> 
> With this in mind, I'll answer the questions below:
> 
> > On May 1, 2018, at 12:56 PM, Iavor Diatchki <iavor.diatchki at gmail.c
> > om> wrote:
> > 
> > -- 1) The "normal" case.  I've written the types of the introduces names underneath, are they correct?
> > data T1 {k} (a :: k) = C1
> > -- T1 :: forall {k::Type}. k -> Type
> > -- C1 :: forall {k::Type} (a :: k). T1 {k} a
> 
> I would say we get
> 
> T1 :: forall (k :: Type) -> k -> Type    -- T1 has *2* visible arguments
> C1 :: forall {k :: Type} (a :: k). T1 k a   -- C1 has one inferred and one specified type argument


I think this is highly confusing. The {k} is on T1, but it does not
affect T1, but rather something else?

What is wrong with “if you want to have different specificity on the
tycon and the datacon, use GADTSyntax”?

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/20180502/d8bfef42/attachment.sig>


More information about the ghc-steering-committee mailing list