summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Functor/Compose.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-09 15:49:07 -0400
committerBen Gamari <ben@smart-cactus.org>2020-05-09 15:50:28 -0400
commitc8cf710a02c386d5007a8a6179ec1826b7085a29 (patch)
tree515e0db0458fb7f185c6024a5153bb8e06621608 /libraries/base/Data/Functor/Compose.hs
parent86c77b36628dcce7bc9b066fc24c8c521fecc3ee (diff)
downloadhaskell-wip/revert-MR3132.tar.gz
Revert "Specify kind variables for inferred kinds in base."wip/revert-MR3132
As noted in !3132, this has rather severe knock-on consequences in user-code. We'll need to revisit this before merging something along these lines. This reverts commit 9749fe1223d182b1f8e7e4f7378df661c509f396.
Diffstat (limited to 'libraries/base/Data/Functor/Compose.hs')
-rw-r--r--libraries/base/Data/Functor/Compose.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/libraries/base/Data/Functor/Compose.hs b/libraries/base/Data/Functor/Compose.hs
index 225d16283b..d8369ebc05 100644
--- a/libraries/base/Data/Functor/Compose.hs
+++ b/libraries/base/Data/Functor/Compose.hs
@@ -3,7 +3,6 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
-{-# LANGUAGE StandaloneKindSignatures #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeOperators #-}
-----------------------------------------------------------------------------
@@ -27,7 +26,6 @@ module Data.Functor.Compose (
import Data.Functor.Classes
-import Data.Kind (Type)
import Control.Applicative
import Data.Coerce (coerce)
import Data.Data (Data)
@@ -40,9 +38,6 @@ infixr 9 `Compose`
-- | Right-to-left composition of functors.
-- The composition of applicative functors is always applicative,
-- but the composition of monads is not always a monad.
---
--- Kinds `k2` and `k1` explicitly quantified since 4.15.0.0.
-type Compose :: forall k2 k1. (k2 -> Type) -> (k1 -> k2) -> (k1 -> Type)
newtype Compose f g a = Compose { getCompose :: f (g a) }
deriving ( Data -- ^ @since 4.9.0.0
, Generic -- ^ @since 4.9.0.0
@@ -131,7 +126,7 @@ instance (Alternative f, Applicative g) => Alternative (Compose f g) where
-- | The deduction (via generativity) that if @g x :~: g y@ then @x :~: y@.
--
-- @since 4.14.0.0
-instance TestEquality f => TestEquality (Compose f g) where
+instance (TestEquality f) => TestEquality (Compose f g) where
testEquality (Compose x) (Compose y) =
case testEquality x y of -- :: Maybe (g x :~: g y)
Just Refl -> Just Refl -- :: Maybe (x :~: y)