[GHC] #8185: Change role annotation syntax
GHC
ghc-devs at haskell.org
Wed Aug 28 11:41:46 UTC 2013
#8185: Change role annotation syntax
----------------------------+----------------------------------------------
Reporter: | Owner: goldfire
goldfire | Status: new
Type: feature | Milestone: 7.8.1
request | Version: 7.7
Priority: normal | Keywords:
Component: | Architecture: Unknown/Multiple
Compiler | Difficulty: Moderate (less than a day)
Resolution: | Blocked By:
Operating System: | Related Tickets:
Unknown/Multiple |
Type of failure: |
None/Unknown |
Test Case: |
Blocking: |
----------------------------+----------------------------------------------
Comment (by simonpj):
Thus far, pragmas have always been optional; that is, the program will
compile ok without them. Eg INLINE pragmas, deprecations, SPECIALISE etc.
This is different: the program won't typecheck without the pragma, and
that is new. It's a bit like we put type signatures in pragmas.
To me these role annotations are just like kind annotations. Why don't we
put kind annotations in pragmas? Role annotations really are part of the
''language''.
I'm ok with a noisy notation; it's only the pragma-brackets that bug me.
Shall we explore some alternatives first? (Remember that whatever we do
must be compatible with also having a kind annotation.) For example
{{{
data Foo [Nominal] a = ...
data Foo ([Nominal] a :: *) = ...
data Foo [role Nominal] a = ...
-- Or postfix versions
data Foo a [Nominal] = ...
data Foo a [role Nominal] = ...
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8185#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list