summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Functor/Sum.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/Data/Functor/Sum.hs')
-rw-r--r--libraries/base/Data/Functor/Sum.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/libraries/base/Data/Functor/Sum.hs b/libraries/base/Data/Functor/Sum.hs
index f7d6178a2b..cca541fe5e 100644
--- a/libraries/base/Data/Functor/Sum.hs
+++ b/libraries/base/Data/Functor/Sum.hs
@@ -1,7 +1,9 @@
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE Safe #-}
+{-# LANGUAGE StandaloneKindSignatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Functor.Sum
@@ -23,11 +25,15 @@ module Data.Functor.Sum (
import Control.Applicative ((<|>))
import Data.Data (Data)
+import Data.Kind (Type)
import Data.Functor.Classes
import GHC.Generics (Generic, Generic1)
import Text.Read (Read(..), readListDefault, readListPrecDefault)
-- | Lifted sum of functors.
+--
+-- Kind `k` explicitly quantified since 4.15.0.0.
+type Sum :: forall k. (k -> Type) -> (k -> Type) -> (k -> Type)
data Sum f g a = InL (f a) | InR (g a)
deriving ( Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0