From 5e09ef99533d2ba8967d9a31bea454241fed74cf Mon Sep 17 00:00:00 2001 From: fendor Date: Tue, 24 Sep 2019 11:29:25 +0200 Subject: [PATCH] Fix compat for ghc 8.4.4 Fix Compat for Match clause Fix Compat HsBinds clause Remove redundant pattern match --- hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs | 4 ++-- src/Haskell/Ide/Engine/Plugin/Generic.hs | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs index 4673d0207..2cc3ac493 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs @@ -450,7 +450,7 @@ pattern HsValBindsCompat f <- pattern ValBindsCompat f g <- #if __GLASGOW_HASKELL__ < 806 - ValBinds f g + ValBindsIn f g #else ValBinds _ f g #endif @@ -484,7 +484,7 @@ pattern SigDCompat f <- pattern MatchCompat ms <- #if __GLASGOW_HASKELL__ < 806 - Match ({ GHC.m_grhss = GHC.GRHSs { GHC.grhssLocalBinds = ms } }) + ((GHC.grhssLocalBinds . GHC.m_grhss) -> ms) #else (gomatch' -> ms) diff --git a/src/Haskell/Ide/Engine/Plugin/Generic.hs b/src/Haskell/Ide/Engine/Plugin/Generic.hs index 76ddb39ea..146fed7c9 100644 --- a/src/Haskell/Ide/Engine/Plugin/Generic.hs +++ b/src/Haskell/Ide/Engine/Plugin/Generic.hs @@ -514,12 +514,10 @@ symbolProvider uri = pluginGetFile "ghc-mod symbolProvider: " uri $ #elif __GLASGOW_HASKELL__ >= 804 goValD (L _ (VarBind _ _ _)) = error "goValD" goValD (L _ (AbsBinds _ _ _ _ _ _)) = error "goValD" - goValD (L _ (PatSynBind _)) = error "goValD" #else goValD (L _ (VarBind _ _ _)) = error "goValD" goValD (L _ (AbsBinds _ _ _ _ _)) = error "goValD" goValD (L _ (AbsBindsSig _ _ _ _ _ _)) = error "goValD" - goValD (L _ (PatSynBind _)) = error "goValD" #endif -- -----------------------------