diff --git a/Language/Haskell/GhcMod/CaseSplit.hs b/Language/Haskell/GhcMod/CaseSplit.hs index aab4dc3..0a5c810 100644 --- a/Language/Haskell/GhcMod/CaseSplit.hs +++ b/Language/Haskell/GhcMod/CaseSplit.hs @@ -92,7 +92,11 @@ getSrcSpanTypeForFnSplit modSum lineNo colNo = do varT <- Gap.getType tcm varPat' -- Finally we get the type of the var case varT of Just varT' -> +#if __GLASGOW_HASKELL__ >= 710 let (L matchL (G.Match _ _ _ (G.GRHSs rhsLs _))) = match +#else + let (L matchL (G.Match _ _ (G.GRHSs rhsLs _))) = match +#endif in return $ Just (SplitInfo (getPatternVarName varPat') matchL varT' (map G.getLoc rhsLs) ) _ -> return Nothing diff --git a/Language/Haskell/GhcMod/FillSig.hs b/Language/Haskell/GhcMod/FillSig.hs index f9be127..092248a 100644 --- a/Language/Haskell/GhcMod/FillSig.hs +++ b/Language/Haskell/GhcMod/FillSig.hs @@ -481,7 +481,11 @@ getPatsForVariable tcs (lineNo, colNo) = #else :: [G.LMatch Id] #endif +#if __GLASGOW_HASKELL__ >= 710 (L _ (G.Match _ pats _ _):_) = m +#else + (L _ (G.Match pats _ _):_) = m +#endif in (funId, pats) _ -> (error "This should never happen", [])