mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-12 13:06:18 +03:00
Remove (>@>)
This commit is contained in:
parent
27111af2f2
commit
e5aa311611
@ -3,7 +3,6 @@ module Polysemy
|
|||||||
Sem ()
|
Sem ()
|
||||||
, Member
|
, Member
|
||||||
, Members
|
, Members
|
||||||
, type (>@>)
|
|
||||||
|
|
||||||
-- * Running Sem
|
-- * Running Sem
|
||||||
, run
|
, run
|
||||||
|
@ -7,7 +7,6 @@ module Polysemy.Internal
|
|||||||
( Sem (..)
|
( Sem (..)
|
||||||
, Member
|
, Member
|
||||||
, Members
|
, Members
|
||||||
, type (>@>)
|
|
||||||
, send
|
, send
|
||||||
, sendM
|
, sendM
|
||||||
, run
|
, run
|
||||||
@ -156,28 +155,6 @@ type family Members es r :: Constraint where
|
|||||||
Members (e ': es) r = (Member e r, Members es r)
|
Members (e ': es) r = (Member e r, Members es r)
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
-- | Compact alternative to 'Sem' type with 'Member' effects:
|
|
||||||
--
|
|
||||||
-- @
|
|
||||||
-- foo :: \'['Polysemy.Output.Output' Int, 'Polysemy.Output.Output' Bool] >@> ()
|
|
||||||
-- @
|
|
||||||
--
|
|
||||||
-- translates into:
|
|
||||||
--
|
|
||||||
-- @
|
|
||||||
-- foo :: ( 'Member' ('Polysemy.Output.Output' Int) r
|
|
||||||
-- , 'Member' ('Polysemy.Output.Output' Bool) r
|
|
||||||
-- )
|
|
||||||
-- => 'Sem' r ()
|
|
||||||
-- @
|
|
||||||
--
|
|
||||||
-- (NB: keep in mind that 'r' variable representing list of all effects is
|
|
||||||
-- hidden behind rank-2 type --- use 'Members' instead if you need access to it.)
|
|
||||||
infixr 1 >@>
|
|
||||||
type es >@> a = ∀ r. Members r es => Sem r a
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
-- | Like 'runSem' but flipped for better ergonomics sometimes.
|
-- | Like 'runSem' but flipped for better ergonomics sometimes.
|
||||||
usingSem
|
usingSem
|
||||||
|
Loading…
Reference in New Issue
Block a user