Type families in kind signatures with TypeInType

David Menendez dave at zednenem.com
Fri Sep 23 19:19:04 UTC 2016


On Fri, Sep 23, 2016 at 3:00 PM, Simon Peyton Jones <simonpj at microsoft.com>
wrote:

> Interesting. Is this case also an example, or is it a non-feature?
>
>
>
> class C t where
>
>     type K t :: Type
>
>     type T t :: K t -> Type
>
>
>
>     m :: t -> T t a
>
>
>
>
>
> Ah, that’s quite different!  We should do strongly-connected-component
> analysis of the associated-type declarations within a single class
> declaration…. but we don’t currently do that.   No difficulty in principle,
> I think.
>
>
>
> You could open a ticket.   (Do include a link to this email thread and to
> #12088)
>

I’ve opened ticket #12612 <https://ghc.haskell.org/trac/ghc/ticket/12612>.

Assuming GHC accepted this definition, would the Template Haskell trick (or
whatever replaces it) allow defining instances of C?

-- 
Dave Menendez <dave at zednenem.com>
<http://www.eyrie.org/~zednenem/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20160923/f9bfac4b/attachment.html>


More information about the Glasgow-haskell-users mailing list