[GHC] #2436: Bad warning when exporting data families
Manuel M T Chakravarty
chak at cse.unsw.edu.au
Mon Jul 14 23:57:22 EDT 2008
David Waern:
> 2008/7/13 GHC <trac at galois.com>:
>> #2436: Bad warning when exporting data families
>> -------------------------
>> +--------------------------------------------------
>> Reporter: rl | Owner: chak
>> Type: bug | Status: new
>> Priority: normal | Milestone:
>> Component: Compiler | Version: 6.9
>> Severity: normal | Resolution:
>> Keywords: | Testcase:
>> Architecture: Unknown | Os: Unknown
>> -------------------------
>> +--------------------------------------------------
>> Changes (by chak):
>>
>> * owner: => chak
>>
>> --
>> Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2436#comment:1
>> >
>>
> Correct me if I'm wrong, but shouldn't GHC report here that data
> instances can't be exported? Or can they be exported? When
> implementing Type Family support in Haddock, I could see no way to
> export type/data instances using the GHC AST.
They cannot be explicitly exported - they are really like class
instances wrt to import/export.
However, you *can* export the data constructors introduced by a data
instances (just like you can export the data constructors of vanilla
algebraic data types). That's what rl is doing here. He is exporting
the data constructor, not the instances (which is implicitly exported
anyway).
Manuel
More information about the Glasgow-haskell-bugs
mailing list