Commit 8bc3e560 authored by Finn Teegen's avatar Finn Teegen
Browse files

Fix compatibility with GHC 8.4

parent 65bfd25c
...@@ -10,9 +10,13 @@ ...@@ -10,9 +10,13 @@
TODO TODO
-} -}
{-# LANGUAGE CPP #-}
module Base.PrettyTypes where module Base.PrettyTypes where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import qualified Data.Set as Set (Set, toAscList) import qualified Data.Set as Set (Set, toAscList)
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
module Checks.ExportCheck (exportCheck, expandExports) where module Checks.ExportCheck (exportCheck, expandExports) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710 #if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>)) import Control.Applicative ((<$>))
#endif #endif
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
module Checks.KindCheck (kindCheck) where module Checks.KindCheck (kindCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710 #if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>)) import Control.Applicative ((<$>), (<*>))
#endif #endif
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
module Checks.SyntaxCheck (syntaxCheck) where module Checks.SyntaxCheck (syntaxCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710 #if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>)) import Control.Applicative ((<$>), (<*>))
#endif #endif
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
module Checks.TypeCheck (typeCheck) where module Checks.TypeCheck (typeCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
#if __GLASGOW_HASKELL__ < 710 #if __GLASGOW_HASKELL__ < 710
import Control.Applicative ((<$>), (<*>)) import Control.Applicative ((<$>), (<*>))
#endif #endif
......
...@@ -14,8 +14,13 @@ ...@@ -14,8 +14,13 @@
This module searches for potentially irregular code and generates This module searches for potentially irregular code and generates
warning messages. warning messages.
-} -}
{-# LANGUAGE CPP #-}
module Checks.WarnCheck (warnCheck) where module Checks.WarnCheck (warnCheck) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad import Control.Monad
(filterM, foldM_, guard, liftM, liftM2, when, unless) (filterM, foldM_, guard, liftM, liftM2, when, unless)
import Control.Monad.State.Strict (State, execState, gets, modify) import Control.Monad.State.Strict (State, execState, gets, modify)
......
...@@ -16,10 +16,14 @@ ...@@ -16,10 +16,14 @@
information between Curry modules. This is used to create Makefile information between Curry modules. This is used to create Makefile
dependencies and to update programs composed of multiple modules. dependencies and to update programs composed of multiple modules.
-} -}
{-# LANGUAGE CPP #-}
module CurryDeps module CurryDeps
( Source (..), flatDeps, deps, flattenDeps, sourceDeps, moduleDeps ) where ( Source (..), flatDeps, deps, flattenDeps, sourceDeps, moduleDeps ) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad (foldM) import Control.Monad (foldM)
import Data.List (isSuffixOf, nub) import Data.List (isSuffixOf, nub)
import qualified Data.Map as Map (Map, empty, insert, lookup, toList) import qualified Data.Map as Map (Map, empty, insert, lookup, toList)
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
exported at all in order to make the interface more stable against exported at all in order to make the interface more stable against
changes which are private to the module. changes which are private to the module.
-} -}
{-# LANGUAGE CPP #-}
module Env.TypeConstructor module Env.TypeConstructor
( TypeInfo (..), tcKind, clsKind, varKind, clsMethods ( TypeInfo (..), tcKind, clsKind, varKind, clsMethods
, TCEnv, initTCEnv, bindTypeInfo, rebindTypeInfo , TCEnv, initTCEnv, bindTypeInfo, rebindTypeInfo
...@@ -53,6 +53,10 @@ module Env.TypeConstructor ...@@ -53,6 +53,10 @@ module Env.TypeConstructor
, getOrigName, reverseLookupByOrigName , getOrigName, reverseLookupByOrigName
) where ) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident import Curry.Base.Ident
import Curry.Base.Pretty (Pretty(..), blankLine) import Curry.Base.Pretty (Pretty(..), blankLine)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
information. On import two values are considered equal if their original information. On import two values are considered equal if their original
names match. names match.
-} -}
{-# LANGUAGE CPP #-}
module Env.Value module Env.Value
( ValueEnv, ValueInfo (..) ( ValueEnv, ValueInfo (..)
, bindGlobalInfo, bindFun, qualBindFun, rebindFun, unbindFun , bindGlobalInfo, bindFun, qualBindFun, rebindFun, unbindFun
...@@ -31,6 +31,10 @@ module Env.Value ...@@ -31,6 +31,10 @@ module Env.Value
, ValueType (..), bindLocalVars, bindLocalVar , ValueType (..), bindLocalVars, bindLocalVar
) where ) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident import Curry.Base.Ident
import Curry.Base.Pretty (Pretty(..)) import Curry.Base.Pretty (Pretty(..))
......
...@@ -16,9 +16,13 @@ ...@@ -16,9 +16,13 @@
printer which, in turn, is based on Simon Marlow's pretty printer printer which, in turn, is based on Simon Marlow's pretty printer
for Haskell. for Haskell.
-} -}
{-# LANGUAGE CPP #-}
module IL.Pretty (ppModule) where module IL.Pretty (ppModule) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Curry.Base.Ident import Curry.Base.Ident
import Curry.Base.Pretty import Curry.Base.Pretty
import IL.Type import IL.Type
......
...@@ -22,8 +22,13 @@ ...@@ -22,8 +22,13 @@
Interface files are updated by the Curry builder when necessary, Interface files are updated by the Curry builder when necessary,
see module "CurryBuilder". see module "CurryBuilder".
-} -}
{-# LANGUAGE CPP #-}
module Interfaces (loadInterfaces) where module Interfaces (loadInterfaces) where
#if __GLASGOW_HASKELL__ >= 804
import Prelude hiding ((<>))
#endif
import Control.Monad (unless) import Control.Monad (unless)
import qualified Control.Monad.State as S (StateT, execStateT, gets, modify) import qualified Control.Monad.State as S (StateT, execStateT, gets, modify)
import qualified Data.Map as M (insert, member) import qualified Data.Map as M (insert, member)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment