We need to add role annotations for 7.8

Dan Doel dan.doel at gmail.com
Fri Mar 28 21:10:27 UTC 2014


On Fri, Mar 28, 2014 at 4:27 PM, David Menendez <dave at zednenem.com> wrote:

> Well, "deriving (Eq, Show)" is a bit less wordy than "type role Foo
> representational representational". Although I guess you could just do
> "type role Foo _ _ _".
>

You forgot some stuff.

    #ifdef __GLASGOW_HASKELL__
    #if __GLASGOW_HASKELL__ >=  708 && __GLASGOW_HASKELL__ < ???
    type role Foo representational nominal representational
    #elif __GLASGOW_HASKELL >= ???
    -- insert whatever the future solution is to actually
    -- handle higher-order types; it will, without question,
    -- be different from the above role annotation.
    #endif
    #endif

    data Foo f x y = Foo (f x) y deriving (Eq, Ord, Show, Read)

Please add that to every type definition in your code. :)

-- Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140328/6b3d297e/attachment.html>


More information about the Libraries mailing list