Skip to content

Commit

Permalink
Fix compat for ghc 8.4.4
Browse files Browse the repository at this point in the history
Fix Compat for Match clause
Fix Compat HsBinds clause

Remove redundant pattern match
  • Loading branch information
fendor committed Sep 25, 2019
1 parent 5a5648d commit 5e09ef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hie-plugin-api/Haskell/Ide/Engine/GhcCompat.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions src/Haskell/Ide/Engine/Plugin/Generic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

-- -----------------------------
Expand Down

0 comments on commit 5e09ef9

Please sign in to comment.