diff options
| author | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-05-04 17:27:49 +0200 |
|---|---|---|
| committer | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-05-04 17:27:49 +0200 |
| commit | fed25228aec3f3bd2f91c50d67043d83efb1af18 (patch) | |
| tree | 93a04929f466dd5db2a2fc62705726382911bf41 /compiler/parser | |
| parent | 91a75b9af1015b053e6904f4ff7bf36c5b1e0ad1 (diff) | |
| download | haskell-fed25228aec3f3bd2f91c50d67043d83efb1af18.tar.gz | |
Remove HsNumTy and TypePati.
They belonged to the old generic deriving mechanism, so they can go. Adapted a lot of code as a consequence.
Diffstat (limited to 'compiler/parser')
| -rw-r--r-- | compiler/parser/Parser.y.pp | 2 | ||||
| -rw-r--r-- | compiler/parser/RdrHsSyn.lhs | 6 |
2 files changed, 1 insertions, 7 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index e009071ebc..1f459e5c87 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1027,8 +1027,6 @@ atype :: { LHsType RdrName } | '$(' exp ')' { LL $ mkHsSpliceTy $2 } | TH_ID_SPLICE { LL $ mkHsSpliceTy $ L1 $ HsVar $ mkUnqual varName (getTH_ID_SPLICE $1) } --- Generics - | INTEGER { L1 (HsNumTy (getINTEGER $1)) } -- An inst_type is what occurs in the head of an instance decl -- e.g. (Foo a, Gaz b) => Wibble a b diff --git a/compiler/parser/RdrHsSyn.lhs b/compiler/parser/RdrHsSyn.lhs index 21fbb5acf1..1d96bf88ea 100644 --- a/compiler/parser/RdrHsSyn.lhs +++ b/compiler/parser/RdrHsSyn.lhs @@ -127,7 +127,6 @@ extract_lty (L loc ty) acc HsPredTy p -> extract_pred p acc HsOpTy ty1 (L loc tv) ty2 -> extract_tv loc tv (extract_lty ty1 (extract_lty ty2 acc)) HsParTy ty -> extract_lty ty acc - HsNumTy {} -> acc HsCoreTy {} -> acc -- The type is closed HsQuasiQuoteTy {} -> acc -- Quasi quotes mention no type variables HsSpliceTy {} -> acc -- Type splices mention no type variables @@ -152,8 +151,7 @@ extractGenericPatTyVars binds get (L _ (FunBind { fun_matches = MatchGroup ms _ })) acc = foldr (get_m.unLoc) acc ms get _ acc = acc - get_m (Match (L _ (TypePat ty) : _) _ _) acc = extract_lty ty acc - get_m _ acc = acc + get_m _ acc = acc \end{code} @@ -732,8 +730,6 @@ checkAPat dynflags loc e0 = case e0 of -> do fs <- mapM checkPatField fs return (ConPatIn c (RecCon (HsRecFields fs dd))) HsQuasiQuoteE q -> return (QuasiQuotePat q) --- Generics - HsType ty -> return (TypePat ty) _ -> patFail loc e0 placeHolderPunRhs :: LHsExpr RdrName |
