@@ -22,10 +22,10 @@ TT is the core language of Idris. The language has:
2222 * We have a simple collection of tactics which we use to elaborate source
2323 programs with implicit syntax into fully explicit terms.
2424-}
25−{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,
26− DeriveTraversable, FlexibleContexts, FlexibleInstances,
27− FunctionalDependencies, MultiParamTypeClasses, PatternGuards,
28− TypeSynonymInstances #-}
25+{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFoldable, DeriveFunctor,
26+ DeriveGeneric, DeriveTraversable, FlexibleContexts,
27+ FlexibleInstances, FunctionalDependencies, MultiParamTypeClasses,
28+ PatternGuards, TypeSynonymInstances #-}
2929{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
3030module Idris.Core.TT(
3131 AppStatus(..), ArithTy(..), Binder(..), Const(..), Ctxt(..)
@@ -63,6 +63,10 @@ import Prelude (Bool(..), Double, Enum(..), Eq(..), FilePath, Functor(..), Int,
6363 Ordering(..), Show(..), String, div, error, fst, max, min, mod,
6464 not, otherwise, read, snd, ($), (&&), (.), (||))
6565
66+#if (MIN_VERSION_base(4,11,0))
67+import qualified Prelude as S (Semigroup(..))
68+#endif
69+
6670import Control.Applicative (Alternative, Applicative(..))
6771import qualified Control.Applicative as A (Alternative(..))
6872import Control.DeepSeq (($!!))
@@ -117,6 +121,11 @@ fc_end (FC _ _ end) = end
117121fc_end NoFC = (0, 0)
118122fc_end (FileFC f) = (0, 0)
119123
124+#if (MIN_VERSION_base(4,11,0))
125+instance S.Semigroup FC where
126+ (<>) = mappend
127+#endif
128+
120129instance Monoid FC where
121130 mempty = NoFC
122131