GHC 7.10.0.20150123 fixes

This commit is contained in:
Markus Hauck 2015-01-29 09:43:31 +01:00 committed by Daniel Gröber
parent 340ff1e4a7
commit e3812b49ec
2 changed files with 8 additions and 3 deletions

View File

@ -92,7 +92,7 @@ getSrcSpanTypeForFnSplit modSum lineNo colNo = do
varT <- Gap.getType tcm varPat' -- Finally we get the type of the var varT <- Gap.getType tcm varPat' -- Finally we get the type of the var
case varT of case varT of
Just varT' -> Just varT' ->
let (L matchL (G.Match _ _ (G.GRHSs rhsLs _))) = match let (L matchL (G.Match _ _ _ (G.GRHSs rhsLs _))) = match
in return $ Just (SplitInfo (getPatternVarName varPat') matchL varT' (map G.getLoc rhsLs) ) in return $ Just (SplitInfo (getPatternVarName varPat') matchL varT' (map G.getLoc rhsLs) )
_ -> return Nothing _ -> return Nothing

View File

@ -143,7 +143,12 @@ getSignature modSum lineNo colNo = do
G.TypeFamily -> Open G.TypeFamily -> Open
G.DataFamily -> Data G.DataFamily -> Data
#endif #endif
#if __GLASGOW_HASKELL__ >= 706
#if __GLASGOW_HASKELL__ >= 710
getTyFamVarName x = case x of
L _ (G.UserTyVar n) -> n
L _ (G.KindedTyVar (G.L _ n) _) -> n
#elif __GLASGOW_HASKELL__ >= 706
getTyFamVarName x = case x of getTyFamVarName x = case x of
L _ (G.UserTyVar n) -> n L _ (G.UserTyVar n) -> n
L _ (G.KindedTyVar n _) -> n L _ (G.KindedTyVar n _) -> n
@ -476,7 +481,7 @@ getPatsForVariable tcs (lineNo, colNo) =
#else #else
:: [G.LMatch Id] :: [G.LMatch Id]
#endif #endif
(L _ (G.Match pats _ _):_) = m (L _ (G.Match _ pats _ _):_) = m
in (funId, pats) in (funId, pats)
_ -> (error "This should never happen", []) _ -> (error "This should never happen", [])