import Outputable
import GlaExts
+import FastString ( tailFS )
#if __HASKELL1__ > 4
import Ratio ( (%) )
| deprecs deprec ';' { $2 : $1 }
deprec :: { RdrNameDeprecation }
-deprec : STRING { DeprecMod $1 }
- | deprec_name STRING { DeprecName $1 $2 }
+deprec : STRING { Deprecation (IEModuleContents undefined) $1 }
+ | deprec_name STRING { Deprecation $1 $2 }
-deprec_name :: { RdrName }
- : var_name { $1 }
- | tc_name { $1 }
+-- SUP: TEMPORARY HACK
+deprec_name :: { RdrNameIE }
+ : var_name { IEVar $1 }
+ | data_name { IEThingAbs $1 }
-----------------------------------------------------------------------------
class :: { HsPred RdrName }
class : qcls_name atypes { (HsPClass $1 $2) }
- | IPVARID '::' type { (HsPIParam (mkSysUnqual ipName $1) $3) }
+ | ipvar_name '::' type { (HsPIParam $1 $3) }
types0 :: { [RdrNameHsType] {- Zero or more -} }
types0 : {- empty -} { [ ] }
| '(#' types0 '#)' { MonoTupleTy $2 False{-unboxed-} }
| '[' type ']' { MonoListTy $2 }
| '{' qcls_name atypes '}' { MonoDictTy $2 $3 }
- | '{' IPVARID '::' type '}' { MonoIParamTy (mkSysUnqual ipName $2) $4 }
+ | '{' ipvar_name '::' type '}' { MonoIParamTy $2 $4 }
| '(' type ')' { $2 }
-- This one is dealt with via qtc_name
qvar_name : var_name { $1 }
| qvar_fs { mkSysQual varName $1 }
+ipvar_name :: { RdrName }
+ : IPVARID { mkSysUnqual ipName (tailFS $1) }
+
var_names :: { [RdrName] }
var_names : { [] }
| var_name var_names { $1 : $2 }