|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
[GHC] #2436: Bad warning when exporting data families#2436: Bad warning when exporting data families
------------------------+--------------------------------------------------- Reporter: rl | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 6.9 | Severity: normal Keywords: | Testcase: Architecture: Unknown | Os: Unknown ------------------------+--------------------------------------------------- {{{ module Foo ( T ) where data family T a }}} {{{ module Bar ( T(..), module Foo ) where import Foo data instance T Int = TInt }}} GHC issues the following warning: {{{ Bar.hs:1:20: Warning: `T' is exported by `module Foo' and `T(..)' }}} However, that's the only way to export both module Foo and TInt from Bar. I don't think GHC should warn here. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2436> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families#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> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families2008/7/13 GHC <trac@...>:
> #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> > GHC <http://www.haskell.org/ghc/> > The Glasgow Haskell Compiler > _______________________________________________ > Glasgow-haskell-bugs mailing list > Glasgow-haskell-bugs@... > http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs > > 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. David _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families2008/7/13 David Waern <david.waern@...>:
> 2008/7/13 GHC <trac@...>: >> #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> >> GHC <http://www.haskell.org/ghc/> >> The Glasgow Haskell Compiler >> _______________________________________________ >> Glasgow-haskell-bugs mailing list >> Glasgow-haskell-bugs@... >> http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs >> >> > > 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. > > David > With exported, I mean explicitly exported, of course. David _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data familiesDavid Waern:
> 2008/7/13 GHC <trac@...>: >> #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 _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families2008/7/15 Manuel M T Chakravarty <chak@...>:
> 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). Ah, I see. So if you have multiple instances, the union of all their data constructors will be exported? What happens in the case of associated types? Are their data constructors always exported, or can they also be exported explicitly somehow? David _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families2008/7/15 David Waern <david.waern@...>:
> 2008/7/15 Manuel M T Chakravarty <chak@...>: >> 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). > > Ah, I see. So if you have multiple instances, the union of all their > data constructors will be exported? What happens in the case of > associated types? Are their data constructors always exported, or can > they also be exported explicitly somehow? Sorry for bothering you, I just realized all of this is explained on the wiki page. David _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
|
Re: [GHC] #2436: Bad warning when exporting data families#2436: Bad warning when exporting data families
----------------------+----------------------------------------------------- Reporter: rl | Owner: chak Type: bug | Status: new Priority: normal | Milestone: 6.10.1 Component: Compiler | Version: 6.9 Severity: normal | Resolution: Keywords: | Difficulty: Unknown Testcase: | Architecture: Unknown Os: Unknown | ----------------------+----------------------------------------------------- Changes (by igloo): * difficulty: => Unknown * milestone: => 6.10.1 -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2436#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@... http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
| Free Forum Powered by Nabble | Forum Help |