Proposal: add -XPolyKinds to Data.Monoid

Edward Kmett ekmett at gmail.com
Tue Jul 15 01:57:38 UTC 2014


Ah yeah. I remember when we moved it. We just accidentally lost the
PolyKinds along the way. Should be easy enough to fix.


On Mon, Jul 14, 2014 at 2:51 PM, adam vogt <vogt.adam at gmail.com> wrote:

> The example works with ghc-7.6.3. It looks like
> https://github.com/ghc/ghc/commit/1d1ff77aaa09efaddc8cfe0dcf92d6763297cf11
> is to blame.
>
> On Mon, Jul 14, 2014 at 12:37 PM, Carl Howells <chowells79 at gmail.com>
> wrote:
> > At the moment, the Monoid instance for Data.Proxy.Proxy is only
> > defined for types with kind *.
> >
> >     Prelude Data.Proxy Data.Monoid> (Proxy :: Proxy String) <> Proxy
> >     Proxy
> >     Prelude Data.Proxy Data.Monoid> :set -XDataKinds
> >     Prelude Data.Proxy Data.Monoid> (Proxy :: Proxy 5) <> Proxy
> >
> >     <interactive>:8:20:
> >         No instance for (Monoid (Proxy 5)) arising from a use of ‘<>’
> >         In the expression: (Proxy :: Proxy 5) <> Proxy
> >         In an equation for ‘it’: it = (Proxy :: Proxy 5) <> Proxy
> >
> > Enabling -XPolyKinds while compiling the Data.Monoid module is the
> > only change necessary to make the Monoid instance for Proxy polykinded
> > like Proxy itself is. I don't believe adding a language pragma would
> > have any other effect on that module, and I believe the only effect of
> > changing that instance would be allowing more correct programs to
> > compile.
> >
> > This is my first proposal to this list, so I'm starting with something
> > that I hope isn't controversial. Let me know if I should do anything
> > different procedurally in future proposals.
> >
> > Thanks.
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140714/ec836fe2/attachment-0001.html>


More information about the Libraries mailing list