[GHC] #8488: Annotations should not distinguish type and value
GHC
ghc-devs at haskell.org
Wed Oct 30 09:01:54 UTC 2013
#8488: Annotations should not distinguish type and value
------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: | Operating System: Unknown/Multiple
Architecture: Unknown/Multiple | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
------------------------------------+-------------------------------------
In `HsDecls` we have
{{{
data AnnDecl name = HsAnnotation (AnnProvenance name) (Located (HsExpr
name))
data AnnProvenance name = ValueAnnProvenance name
| TypeAnnProvenance name
| ModuleAnnProvenance
}}}
And there's now a similar 3-way distinction in Template Haskell `Syntax`:
{{{
data AnnTarget = ModuleAnnotation
| TypeAnnotation Name
| ValueAnnotation Name
}}}
But there's really no need to distinguish between `TypeAnnProvenance` and
`ValueAnnProvenance` (and similarly in the TH vesrion) because the
namespace on the `Name` makes that distinction. So the current story is
redundant, and hence has silly case where you have a `ValueAnnProvenance`
on a type constructor.
Better to collapse the two. I'm making this a ticket so that people can
comment. I hope that Gergely may be able to do it as part of his
TH/annotation work.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8488>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list