diff options
author | alexwl <alexey.a.kiryushin@gmail.com> | 2019-09-29 13:45:37 +0300 |
---|---|---|
committer | alexwl <alexey.a.kiryushin@gmail.com> | 2019-09-29 13:45:37 +0300 |
commit | dc023cee45d7b42028851830f9310b9cbe72fbed (patch) | |
tree | 9e378b3022e90ea050d32b19ac45f620078619b3 /src/HaskellCodeExplorer/GhcUtils.hs | |
parent | 6c6d96288f41b7c44657e265dc98e519505e357c (diff) |
Make it compile with GHC-8.8.1 (Stackage nightly-2019-09-28)
Diffstat (limited to 'src/HaskellCodeExplorer/GhcUtils.hs')
-rw-r--r-- | src/HaskellCodeExplorer/GhcUtils.hs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/HaskellCodeExplorer/GhcUtils.hs b/src/HaskellCodeExplorer/GhcUtils.hs index bb89832..0f3ff1c 100644 --- a/src/HaskellCodeExplorer/GhcUtils.hs +++ b/src/HaskellCodeExplorer/GhcUtils.hs @@ -25,6 +25,7 @@ module HaskellCodeExplorer.GhcUtils , hsGroupVals , hsPatSynDetails , ieLocNames + , ghcDL -- * Lookups , lookupIdInTypeEnv , lookupNameModuleAndPackage @@ -165,6 +166,11 @@ import GHC , tfe_pats #endif , tfid_eqn +#if MIN_VERSION_ghc(8,8,0) + , dL + , HasSrcSpan + , SrcSpanLess +#endif ) import qualified HaskellCodeExplorer.Types as HCE @@ -1203,7 +1209,7 @@ isUserLSig (L _ ClassOpSig {}) = True isUserLSig _ = False #if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) -getMainDeclBinder :: HsDecl pass -> [IdP pass] +getMainDeclBinder :: HsDecl GhcRn -> [IdP GhcRn] #else getMainDeclBinder :: HsDecl name -> [name] #endif @@ -1401,3 +1407,11 @@ makeAnchorId (f:r) = escape isAlpha f ++ concatMap (escape isLegal) r isLegal '_' = True isLegal '.' = True isLegal c = isAscii c && isAlphaNum c + +#if MIN_VERSION_ghc(8,8,0) +ghcDL :: GHC.HasSrcSpan a => a -> GHC.Located (GHC.SrcSpanLess a) +ghcDL = GHC.dL +#else +ghcDL :: GHC.Located a -> GHC.Located a +ghcDL x = x +#endif |