| ITdata
| ITdefault
| ITderiving
- | ITderived
+ | ITderive
| ITdo
| ITelse
| IThiding
-- not as a keyword.
isSpecial ITas = True
isSpecial IThiding = True
-isSpecial ITderived = True
+isSpecial ITderive = True
isSpecial ITqualified = True
isSpecial ITforall = True
isSpecial ITexport = True
( "data", ITdata, 0 ),
( "default", ITdefault, 0 ),
( "deriving", ITderiving, 0 ),
- ( "derived", ITderived, 0 ),
+ ( "derive", ITderive, 0 ),
( "do", ITdo, 0 ),
( "else", ITelse, 0 ),
( "hiding", IThiding, 0 ),
'data' { L _ ITdata }
'default' { L _ ITdefault }
'deriving' { L _ ITderiving }
- 'derived' { L _ ITderived }
+ 'derive' { L _ ITderive }
'do' { L _ ITdo }
'else' { L _ ITelse }
'hiding' { L _ IThiding }
-- Glasgow extension: stand-alone deriving declarations
stand_alone_deriving :: { LDerivDecl RdrName }
- : 'derived' 'instance' inst_type {% checkDerivDecl (LL (DerivDecl $3)) }
+ : 'derive' 'instance' inst_type {% checkDerivDecl (LL (DerivDecl $3)) }
-----------------------------------------------------------------------------
-- Nested declarations
: 'as' { L1 FSLIT("as") }
| 'qualified' { L1 FSLIT("qualified") }
| 'hiding' { L1 FSLIT("hiding") }
- | 'derived' { L1 FSLIT("derived") }
+ | 'derive' { L1 FSLIT("derive") }
| 'export' { L1 FSLIT("export") }
| 'label' { L1 FSLIT("label") }
| 'dynamic' { L1 FSLIT("dynamic") }
<title>Stand-alone deriving declarations</title>
<para>
-GHC now allows stand-alone <literal>deriving</literal> declarations:
+GHC now allows stand-alone <literal>deriving</literal> declarations, enabled by <literal>-fglasgow-exts</literal>:
<programlisting>
data Foo a = Bar a | Baz String