@@ -22,10 +22,10 @@ TT is the core language of Idris. The language has:
22 * We have a simple collection of tactics which we use to elaborate source
22 * We have a simple collection of tactics which we use to elaborate source
23 programs with implicit syntax into fully explicit terms.
23 programs with implicit syntax into fully explicit terms.
25−{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,
25+{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFoldable, DeriveFunctor,
26− DeriveTraversable, FlexibleContexts, FlexibleInstances,
26+ DeriveGeneric, DeriveTraversable, FlexibleContexts,
27− FunctionalDependencies, MultiParamTypeClasses, PatternGuards,
27+ FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses,
28− TypeSynonymInstances #-}
28+ PatternGuards, TypeSynonymInstances #-}
29{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
29{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
30module Idris.Core.TT(
30module Idris.Core.TT(
31 AppStatus(..), ArithTy(..), Binder(..), Const(..), Ctxt(..)
31 AppStatus(..), ArithTy(..), Binder(..), Const(..), Ctxt(..)
@@ -63,6 +63,10 @@ import Prelude (Bool(..), Double, Enum(..), Eq(..), FilePath, Functor(..), Int,
63 Ordering(..), Show(..), String, div, error, fst, max, min, mod,
63 Ordering(..), Show(..), String, div, error, fst, max, min, mod,
64 not, otherwise, read, snd, ($), (&&), (.), (||))
64 not, otherwise, read, snd, ($), (&&), (.), (||))
66+#if (MIN_VERSION_base(4,11,0))
67+import qualified Prelude as S (Semigroup(..))
66import Control.Applicative (Alternative, Applicative(..))
70import Control.Applicative (Alternative, Applicative(..))
67import qualified Control.Applicative as A (Alternative(..))
71import qualified Control.Applicative as A (Alternative(..))
68import Control.DeepSeq (($!!))
72import Control.DeepSeq (($!!))
@@ -117,6 +121,11 @@ fc_end (FC _ _ end) = end
117fc_end NoFC = (0, 0)
121fc_end NoFC = (0, 0)
118fc_end (FileFC f) = (0, 0)
122fc_end (FileFC f) = (0, 0)
124+#if (MIN_VERSION_base(4,11,0))
125+instance S.Semigroup FC where
120instance Monoid FC where
129instance Monoid FC where
121 mempty = NoFC
130 mempty = NoFC