Skip to content

Commit

Permalink
[serokell#174] Remove 'type-operators' dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
rockbmb committed Aug 7, 2018
1 parent bb33704 commit e736db5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
Remove `ElementConstraint` from the `Container` class.

_Migration guide:_ remove `ElementConstraint` from every instance and every type signature.
* [#174](https:/serokell/universum/issues/174)
The 'type-operators' dependency has been removed.
* [#177](https:/serokell/universum/issues/177):
'mask_' is no longer reexported.
* [#178](https:/serokell/universum/issues/178):
Expand Down
22 changes: 21 additions & 1 deletion src/Universum/TypeOps.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,27 @@ import GHC.Prim (Constraint)
import Data.Kind (Constraint)
#endif

import Control.Type.Operator (type ($), type (<+>))
-- | Infix application.
--
-- @
-- f :: Either String $ Maybe Int
-- =
-- f :: Either String (Maybe Int)
-- @
type f $ a = f a
infixr 2 $

-- | Map several constraints over a single variable.
--
-- @
-- a :: [Show, Read] \<+> a => a -> a
-- =
-- a :: (Show a, Read a) => a -> a
-- @
type family (<+>) (c :: [k -> Constraint]) (a :: k) where
(<+>) '[] a = (() :: Constraint)
(<+>) (ch ': ct) a = (ch a, (<+>) ct a)
infixl 9 <+>

-- | Map several constraints over several variables.
--
Expand Down
1 change: 0 additions & 1 deletion universum.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ library
, stm
, text
, transformers
, type-operators
, unordered-containers
, utf8-string
, vector
Expand Down

0 comments on commit e736db5

Please sign in to comment.