From 31267d352e329875e647fa422d68b08106a36cf2 Mon Sep 17 00:00:00 2001 From: alexwl Date: Fri, 17 May 2019 18:43:42 +0300 Subject: Code cleanup: fix warnings --- src/HaskellCodeExplorer/AST/RenamedSource.hs | 10 ++++++++++ src/HaskellCodeExplorer/AST/TypecheckedSource.hs | 15 ++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'src/HaskellCodeExplorer/AST') diff --git a/src/HaskellCodeExplorer/AST/RenamedSource.hs b/src/HaskellCodeExplorer/AST/RenamedSource.hs index 90f9ceb..68aeddb 100644 --- a/src/HaskellCodeExplorer/AST/RenamedSource.hs +++ b/src/HaskellCodeExplorer/AST/RenamedSource.hs @@ -18,7 +18,10 @@ import GHC ( AmbiguousFieldOcc(..) , ConDecl(..) , ConDeclField(..) +#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) +#else , DataFamInstDecl(..) +#endif , FamilyDecl(..) , FieldOcc(..) , FixitySig(..) @@ -26,7 +29,11 @@ import GHC , GenLocated(..) , HsBindLR(..) , HsExpr(..) +#if MIN_VERSION_GLASGOW_HASKELL(8,4,1,0) + , HsPatSynDetails +#else , HsPatSynDetails(..) +#endif , HsRecField'(..) , HsTupleSort(..) , HsTyLit(..) @@ -36,7 +43,10 @@ import GHC , IE(..) , LHsBindLR , LHsExpr +#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) +#else , LHsQTyVars(..) +#endif , LHsType , LPat , LSig diff --git a/src/HaskellCodeExplorer/AST/TypecheckedSource.hs b/src/HaskellCodeExplorer/AST/TypecheckedSource.hs index 02f406b..50ab061 100644 --- a/src/HaskellCodeExplorer/AST/TypecheckedSource.hs +++ b/src/HaskellCodeExplorer/AST/TypecheckedSource.hs @@ -20,7 +20,11 @@ module HaskellCodeExplorer.AST.TypecheckedSource import Bag (bagToList) import BasicTypes (Origin(..)) import Class (Class, classTyVars) -import ConLike (ConLike(..),conLikeWrapId_maybe) +import ConLike (ConLike(..) +#if MIN_VERSION_GLASGOW_HASKELL(8,2,2,0) + , conLikeWrapId_maybe +#endif + ) import Control.Monad (return, unless, void) import Control.Monad.State.Strict (State, get, modify') import qualified Data.HashMap.Strict as HM @@ -35,7 +39,12 @@ import DynFlags (DynFlags) import FastString (mkFastString) import HaskellCodeExplorer.GhcUtils import qualified HaskellCodeExplorer.Types as HCE -import HsBinds (HsPatSynDetails(..), RecordPatSynField(..)) +import HsBinds (RecordPatSynField(..) +#if MIN_VERSION_GLASGOW_HASKELL(8,4,3,0) +#else + , HsPatSynDetails (..) +#endif + ) import HsSyn ( ABExport(..) , ApplicativeArg(..) @@ -175,7 +184,7 @@ data Environment = Environment -- | Indicates whether an expression consists of more than one token. -- Simple expression : wildcard, literal --- Composite expressin : applcation, lambda abstraction,... +-- Composite expression : application, lambda abstraction,... data ExprSort = Simple | Composite -- cgit v1.2.3