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/rename/RnHsSyn.lhs | |
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/rename/RnHsSyn.lhs')
-rw-r--r-- | compiler/rename/RnHsSyn.lhs | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/compiler/rename/RnHsSyn.lhs b/compiler/rename/RnHsSyn.lhs index 44aa70031d..478ba32655 100644 --- a/compiler/rename/RnHsSyn.lhs +++ b/compiler/rename/RnHsSyn.lhs @@ -11,9 +11,7 @@ module RnHsSyn( extractFunDepNames, extractHsCtxtTyNames, extractHsPredTyNames, -- Free variables - hsSigsFVs, hsSigFVs, conDeclFVs, bangTyFVs, - - maybeGenericMatch + hsSigsFVs, hsSigFVs, conDeclFVs, bangTyFVs ) where #include "HsVersions.h" @@ -66,7 +64,6 @@ extractHsTyNames ty get (HsParTy ty) = getl ty get (HsBangTy _ ty) = getl ty get (HsRecTy flds) = extractHsTyNames_s (map cd_fld_type flds) - get (HsNumTy _) = emptyNameSet get (HsTyVar tv) = unitNameSet tv get (HsSpliceTy _ fvs _) = fvs get (HsQuasiQuoteTy {}) = emptyNameSet @@ -145,24 +142,3 @@ conDetailsFVs details = plusFVs (map bangTyFVs (hsConDeclArgTys details)) bangTyFVs :: LHsType Name -> FreeVars bangTyFVs bty = extractHsTyNames (getBangType bty) \end{code} - - -%************************************************************************ -%* * -\subsection{A few functions on generic defintions -%* * -%************************************************************************ - -These functions on generics are defined over Matches Name, which is -why they are here and not in HsMatches. - -\begin{code} -maybeGenericMatch :: LMatch Name -> Maybe (HsType Name, LMatch Name) - -- Tells whether a Match is for a generic definition - -- and extract the type from a generic match and put it at the front - -maybeGenericMatch (L loc (Match (L _ (TypePat (L _ ty)) : pats) sig_ty grhss)) - = Just (ty, L loc (Match pats sig_ty grhss)) - -maybeGenericMatch _ = Nothing -\end{code} |