Commit 5673173d authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge with HEAD

parents 64035404 673b1bec
...@@ -6,7 +6,6 @@ Functions over HsSyn specialised to RdrName. ...@@ -6,7 +6,6 @@ Functions over HsSyn specialised to RdrName.
\begin{code} \begin{code}
module RdrHsSyn ( module RdrHsSyn (
extractHsTyRdrTyVars, extractHsTysRdrTyVars, extractHsTyRdrTyVars, extractHsTysRdrTyVars,
extractGenericPatTyVars,
mkHsOpApp, mkHsOpApp,
mkHsIntegral, mkHsFractional, mkHsIsString, mkHsIntegral, mkHsFractional, mkHsIsString,
...@@ -75,7 +74,7 @@ import PrelNames ( forall_tv_RDR ) ...@@ -75,7 +74,7 @@ import PrelNames ( forall_tv_RDR )
import DynFlags import DynFlags
import SrcLoc import SrcLoc
import OrdList ( OrdList, fromOL ) import OrdList ( OrdList, fromOL )
import Bag ( Bag, emptyBag, consBag, foldrBag ) import Bag ( Bag, emptyBag, consBag )
import Outputable import Outputable
import FastString import FastString
import Maybes import Maybes
...@@ -83,7 +82,7 @@ import Util ( filterOut ) ...@@ -83,7 +82,7 @@ import Util ( filterOut )
import Control.Applicative ((<$>)) import Control.Applicative ((<$>))
import Control.Monad import Control.Monad
import Text.ParserCombinators.ReadP as ReadP import Text.ParserCombinators.ReadP as ReadP
import Data.List ( nub, nubBy ) import Data.List ( nub )
import Data.Char import Data.Char
#include "HsVersions.h" #include "HsVersions.h"
...@@ -147,17 +146,6 @@ extract_lty (L _ ty) acc ...@@ -147,17 +146,6 @@ extract_lty (L _ ty) acc
extract_tv :: RdrName -> [RdrName] -> [RdrName] extract_tv :: RdrName -> [RdrName] -> [RdrName]
extract_tv tv acc | isRdrTyVar tv = tv : acc extract_tv tv acc | isRdrTyVar tv = tv : acc
| otherwise = acc | otherwise = acc
extractGenericPatTyVars :: LHsBinds RdrName -> [Located RdrName]
-- Get the type variables out of the type patterns in a bunch of
-- possibly-generic bindings in a class declaration
extractGenericPatTyVars binds
= nubBy eqLocated (foldrBag get [] binds)
where
get (L _ (FunBind { fun_matches = MatchGroup ms _ })) acc = foldr (get_m.unLoc) acc ms
get _ acc = acc
get_m _ acc = acc
\end{code} \end{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment