module UVMHS.Core.Data.Dict where
import UVMHS.Core.Init
import UVMHS.Core.Classes
import UVMHS.Core.Data.Iter
import UVMHS.Core.Data.Set
import UVMHS.Core.Data.Pair
import UVMHS.Core.Data.String
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
import qualified Data.Map.Merge.Strict as Map
import qualified Prelude as HS
infixr 1 ↦
infix 4 ⫑,⋿
infixl 5 ⩌,⧅
infixl 6 ⩍
class
( Set k s
, FunctorM d
, OFunctorM d
, KFunctorM k d
, OKFunctorM k d
, BiFunctorM d
, OBiFunctorM d
, KBiFunctorM k d
, OKBiFunctorM k d
, Functor d
, OFunctor d
, KFunctor k d
, OKFunctor k d
, BiFunctor d
, OBiFunctor d
, KBiFunctor k d
, OKBiFunctor k d
, ∀ x. CSized (d x)
, ∀ x. (Eq x) ⇒ Eq (d x)
, ∀ x. (Ord x) ⇒ Ord (d x)
, ∀ x. ToIter (k ∧ x) (d x)
, ∀ x. Single (k ∧ x) (d x)
, ∀ x. Lookup k x (d x)
, ∀ x. Null (d x)
, ∀ x. (Append x) ⇒ Append (d x)
, ∀ x. (Monoid x) ⇒ Monoid (d x)
, ∀ x. (POrd x) ⇒ POrd (d x)
, ∀ x. Bot (d x)
, ∀ x. (Join x) ⇒ Join (d x)
, ∀ x. (JoinLattice x) ⇒ JoinLattice (d x)
, ∀ x. (Meet x) ⇒ Meet (d x)
, ∀ x. (Difference x) ⇒ Difference (d x)
) ⇒ Dict k s d | d→k,d→s
where
dø ∷ d a
dø = d a
forall a. Null a => a
null
(↦) ∷ k → a → d a
(↦) = (k ∧ a) -> d a
forall a t. Single a t => a -> t
single ((k ∧ a) -> d a) -> (k -> a -> k ∧ a) -> k -> a -> d a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> a -> k ∧ a
forall a b. a -> b -> a ∧ b
(:*)
dadd ∷ k → a → d a → d a
dadd k
k a
x = d a -> d a -> d a
forall a. d a -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => d a -> d a -> d a
(⩌) (d a -> d a -> d a) -> d a -> d a -> d a
forall a b. (a -> b) -> a -> b
$ k
k k -> a -> d a
forall a. k -> a -> d a
forall k s (d :: * -> *) a. Dict k s d => k -> a -> d a
↦ a
x
drem ∷ k → d a → d a
drem k
k = k -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall a. k -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall k (t :: * -> *) a.
OKFunctor k t =>
k -> (𝑂 a -> 𝑂 a) -> t a -> t a
okmapAt k
k ((𝑂 a -> 𝑂 a) -> d a -> d a) -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall a b. (a -> b) -> a -> b
$ 𝑂 a -> 𝑂 a -> 𝑂 a
forall a b. a -> b -> a
const 𝑂 a
forall a. 𝑂 a
None
dupd ∷ k → (a → 𝑂 a) → d a → d a
dupd k
k a -> 𝑂 a
f = k -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall a. k -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall k (t :: * -> *) a.
OKFunctor k t =>
k -> (𝑂 a -> 𝑂 a) -> t a -> t a
okmapAt k
k ((𝑂 a -> 𝑂 a) -> d a -> d a) -> (𝑂 a -> 𝑂 a) -> d a -> d a
forall a b. (a -> b) -> a -> b
$ (a -> 𝑂 a) -> 𝑂 a -> 𝑂 a
forall (m :: * -> *) a b. Bind m => (a -> m b) -> m a -> m b
extend a -> 𝑂 a
f
dlteBy ∷ (a → a → 𝔹) → d a → d a → 𝔹
dunionBy ∷ (a → a → a) → d a → d a → d a
dunionBy a -> a -> a
f = (a -> a) -> (a -> a) -> (a -> a -> a) -> d a -> d a -> d a
forall a c b.
(a -> c) -> (b -> c) -> (a -> b -> c) -> d a -> d b -> d c
forall (t :: * -> *) a c b.
BiFunctor t =>
(a -> c) -> (b -> c) -> (a -> b -> c) -> t a -> t b -> t c
bimap a -> a
forall a. a -> a
id a -> a
forall a. a -> a
id a -> a -> a
f
dinterBy ∷ (a → b → c) → d a → d b → d c
dinterBy a -> b -> c
f = (a -> 𝑂 c) -> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> d a -> d b -> d c
forall a c b.
(a -> 𝑂 c) -> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> d a -> d b -> d c
forall (t :: * -> *) a c b.
OBiFunctor t =>
(a -> 𝑂 c) -> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> t a -> t b -> t c
obimap (𝑂 c -> a -> 𝑂 c
forall a b. a -> b -> a
const 𝑂 c
forall a. 𝑂 a
None) (𝑂 c -> b -> 𝑂 c
forall a b. a -> b -> a
const 𝑂 c
forall a. 𝑂 a
None) ((a -> b -> 𝑂 c) -> d a -> d b -> d c)
-> (a -> b -> 𝑂 c) -> d a -> d b -> d c
forall a b. (a -> b) -> a -> b
$ c -> 𝑂 c
forall a. a -> 𝑂 a
Some (c -> 𝑂 c) -> (a -> b -> c) -> a -> b -> 𝑂 c
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> b -> c
f
dsdiffBy ∷ (a → b → 𝑂 a) → d a → d b → d a
dsdiffBy a -> b -> 𝑂 a
f = (a -> 𝑂 a) -> (b -> 𝑂 a) -> (a -> b -> 𝑂 a) -> d a -> d b -> d a
forall a c b.
(a -> 𝑂 c) -> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> d a -> d b -> d c
forall (t :: * -> *) a c b.
OBiFunctor t =>
(a -> 𝑂 c) -> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> t a -> t b -> t c
obimap a -> 𝑂 a
forall a. a -> 𝑂 a
Some (𝑂 a -> b -> 𝑂 a
forall a b. a -> b -> a
const 𝑂 a
forall a. 𝑂 a
None) a -> b -> 𝑂 a
f
(⋿) ∷ ∀ a. k → d a → 𝔹
k
k ⋿ d a
d = case d a
d d a -> k -> 𝑂 a
forall k v t. Lookup k v t => t -> k -> 𝑂 v
⋕? k
k of {𝑂 a
None→𝔹
False;Some (a
_∷a)→𝔹
True}
(⫑) ∷ (Eq a) ⇒ d a → d a → 𝔹
(⫑) = (a -> a -> 𝔹) -> d a -> d a -> 𝔹
forall a. (a -> a -> 𝔹) -> d a -> d a -> 𝔹
forall k s (d :: * -> *) a.
Dict k s d =>
(a -> a -> 𝔹) -> d a -> d a -> 𝔹
dlteBy a -> a -> 𝔹
forall a. Eq a => a -> a -> 𝔹
(≡)
(⩌) ∷ d a → d a → d a
(⩌) = (a -> a -> a) -> d a -> d a -> d a
forall a. (a -> a -> a) -> d a -> d a -> d a
forall k s (d :: * -> *) a.
Dict k s d =>
(a -> a -> a) -> d a -> d a -> d a
dunionBy a -> a -> a
forall a b. a -> b -> a
const
(⩍) ∷ d a → d a → d a
(⩍) = (a -> a -> a) -> d a -> d a -> d a
forall a b c. (a -> b -> c) -> d a -> d b -> d c
forall k s (d :: * -> *) a b c.
Dict k s d =>
(a -> b -> c) -> d a -> d b -> d c
dinterBy a -> a -> a
forall a b. a -> b -> a
const
(⧅) ∷ (Eq a) ⇒ d a → d a → d a
(⧅) = (a -> a -> 𝑂 a) -> d a -> d a -> d a
forall a b. (a -> b -> 𝑂 a) -> d a -> d b -> d a
forall k s (d :: * -> *) a b.
Dict k s d =>
(a -> b -> 𝑂 a) -> d a -> d b -> d a
dsdiffBy ((a -> a -> 𝑂 a) -> d a -> d a -> d a)
-> (a -> a -> 𝑂 a) -> d a -> d a -> d a
forall a b. (a -> b) -> a -> b
$ \ a
x a
y → if a
x a -> a -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ a
y then 𝑂 a
forall a. 𝑂 a
None else a -> 𝑂 a
forall a. a -> 𝑂 a
Some a
x
dminView ∷ d a → 𝑂 (k ∧ a ∧ d a)
dmaxView ∷ d a → 𝑂 (k ∧ a ∧ d a)
dkeyView ∷ k → d a → 𝑂 (a ∧ d a)
dminElem ∷ d a → 𝑂 (k ∧ a)
dminElem = (((k ∧ a) ∧ d a) -> k ∧ a) -> 𝑂 ((k ∧ a) ∧ d a) -> 𝑂 (k ∧ a)
forall a b. (a -> b) -> 𝑂 a -> 𝑂 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map ((k ∧ a) ∧ d a) -> k ∧ a
forall a b. (a ∧ b) -> a
fst (𝑂 ((k ∧ a) ∧ d a) -> 𝑂 (k ∧ a))
-> (d a -> 𝑂 ((k ∧ a) ∧ d a)) -> d a -> 𝑂 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ d a -> 𝑂 ((k ∧ a) ∧ d a)
forall a. d a -> 𝑂 ((k ∧ a) ∧ d a)
forall k s (d :: * -> *) a. Dict k s d => d a -> 𝑂 ((k ∧ a) ∧ d a)
dminView
dmaxElem ∷ d a → 𝑂 (k ∧ a)
dmaxElem = (((k ∧ a) ∧ d a) -> k ∧ a) -> 𝑂 ((k ∧ a) ∧ d a) -> 𝑂 (k ∧ a)
forall a b. (a -> b) -> 𝑂 a -> 𝑂 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map ((k ∧ a) ∧ d a) -> k ∧ a
forall a b. (a ∧ b) -> a
fst (𝑂 ((k ∧ a) ∧ d a) -> 𝑂 (k ∧ a))
-> (d a -> 𝑂 ((k ∧ a) ∧ d a)) -> d a -> 𝑂 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ d a -> 𝑂 ((k ∧ a) ∧ d a)
forall a. d a -> 𝑂 ((k ∧ a) ∧ d a)
forall k s (d :: * -> *) a. Dict k s d => d a -> 𝑂 ((k ∧ a) ∧ d a)
dmaxView
dkeep ∷ s → d a → d a
dkeep s
s d a
d = d a -> (k -> d a -> d a) -> 𝐼 k -> d a
forall b a. b -> (a -> b -> b) -> 𝐼 a -> b
fold𝐼 d a
forall a. d a
forall k s (d :: * -> *) a. Dict k s d => d a
dø (\ k
k → case d a
d d a -> k -> 𝑂 a
forall k v t. Lookup k v t => t -> k -> 𝑂 v
⋕? k
k of {𝑂 a
None → d a -> d a
forall a. a -> a
id;Some a
x → k -> a -> d a -> d a
forall a. k -> a -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => k -> a -> d a -> d a
dadd k
k a
x}) (𝐼 k -> d a) -> 𝐼 k -> d a
forall a b. (a -> b) -> a -> b
$ s -> 𝐼 k
forall a t. ToIter a t => t -> 𝐼 a
iter s
s
dtoss ∷ s → d a → d a
dtoss s
s d a
d = d a -> (k -> d a -> d a) -> 𝐼 k -> d a
forall b a. b -> (a -> b -> b) -> 𝐼 a -> b
fold𝐼 d a
d k -> d a -> d a
forall a. k -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => k -> d a -> d a
drem (𝐼 k -> d a) -> 𝐼 k -> d a
forall a b. (a -> b) -> a -> b
$ s -> 𝐼 k
forall a t. ToIter a t => t -> 𝐼 a
iter s
s
dict𝐼 ∷ 𝐼 (k ∧ a) → d a
dict𝐼 = d a -> (d a -> d a -> d a) -> 𝐼 (d a) -> d a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
foldr d a
forall a. d a
forall k s (d :: * -> *) a. Dict k s d => d a
dø d a -> d a -> d a
forall a. d a -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => d a -> d a -> d a
(⩌) (𝐼 (d a) -> d a) -> (𝐼 (k ∧ a) -> 𝐼 (d a)) -> 𝐼 (k ∧ a) -> d a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ((k ∧ a) -> d a) -> 𝐼 (k ∧ a) -> 𝐼 (d a)
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> d a
forall a t. Single a t => a -> t
single
dkeys ∷ ∀ a. d a → s
dkeys = 𝐼 k -> s
forall s t e. (ToIter e t, Set e s) => t -> s
pow (𝐼 k -> s) -> (𝐼 (k ∧ a) -> 𝐼 k) -> 𝐼 (k ∧ a) -> s
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ((k ∧ a) -> k) -> 𝐼 (k ∧ a) -> 𝐼 k
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> k
forall a b. (a ∧ b) -> a
fst (𝐼 (k ∧ a) -> s) -> (d a -> 𝐼 (k ∧ a)) -> d a -> s
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ forall a t. ToIter a t => t -> 𝐼 a
iter @(k ∧ a)
dvals ∷ ∀ a. d a → 𝐼 a
dvals = ((k ∧ a) -> a) -> 𝐼 (k ∧ a) -> 𝐼 a
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> a
forall a b. (a ∧ b) -> b
snd (𝐼 (k ∧ a) -> 𝐼 a) -> (d a -> 𝐼 (k ∧ a)) -> d a -> 𝐼 a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ forall a t. ToIter a t => t -> 𝐼 a
iter @(k ∧ a)
dunionByOn ∷ (Dict k s d) ⇒ d a → d a → (a → a → a) → d a
dunionByOn :: forall k s (d :: * -> *) a.
Dict k s d =>
d a -> d a -> (a -> a -> a) -> d a
dunionByOn = ((a -> a -> a) -> d a -> d a -> d a)
-> d a -> d a -> (a -> a -> a) -> d a
forall a b c d. (a -> b -> c -> d) -> b -> c -> a -> d
rotateL (a -> a -> a) -> d a -> d a -> d a
forall a. (a -> a -> a) -> d a -> d a -> d a
forall k s (d :: * -> *) a.
Dict k s d =>
(a -> a -> a) -> d a -> d a -> d a
dunionBy
dinterByOn ∷ (Dict k s d) ⇒ d a → d b → (a → b → c) → d c
dinterByOn :: forall k s (d :: * -> *) a b c.
Dict k s d =>
d a -> d b -> (a -> b -> c) -> d c
dinterByOn = ((a -> b -> c) -> d a -> d b -> d c)
-> d a -> d b -> (a -> b -> c) -> d c
forall a b c d. (a -> b -> c -> d) -> b -> c -> a -> d
rotateL (a -> b -> c) -> d a -> d b -> d c
forall a b c. (a -> b -> c) -> d a -> d b -> d c
forall k s (d :: * -> *) a b c.
Dict k s d =>
(a -> b -> c) -> d a -> d b -> d c
dinterBy
dinterByM ∷ (Monad m,Dict k s d) ⇒ (a → b → m c) → d a → d b → m (d c)
dinterByM :: forall (m :: * -> *) k s (d :: * -> *) a b c.
(Monad m, Dict k s d) =>
(a -> b -> m c) -> d a -> d b -> m (d c)
dinterByM a -> b -> m c
f = (a -> m (𝑂 c))
-> (b -> m (𝑂 c)) -> (a -> b -> m (𝑂 c)) -> d a -> d b -> m (d c)
forall (t :: * -> *) (m :: * -> *) a b c.
(OBiFunctorM t, Monad m) =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c)) -> (a -> b -> m (𝑂 c)) -> t a -> t b -> m (t c)
forall (m :: * -> *) a b c.
Monad m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c)) -> (a -> b -> m (𝑂 c)) -> d a -> d b -> m (d c)
obimapM (m (𝑂 c) -> a -> m (𝑂 c)
forall a b. a -> b -> a
const (m (𝑂 c) -> a -> m (𝑂 c)) -> m (𝑂 c) -> a -> m (𝑂 c)
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> m (𝑂 c)
forall a. a -> m a
forall (m :: * -> *) a. Return m => a -> m a
return 𝑂 c
forall a. 𝑂 a
None) (m (𝑂 c) -> b -> m (𝑂 c)
forall a b. a -> b -> a
const (m (𝑂 c) -> b -> m (𝑂 c)) -> m (𝑂 c) -> b -> m (𝑂 c)
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> m (𝑂 c)
forall a. a -> m a
forall (m :: * -> *) a. Return m => a -> m a
return 𝑂 c
forall a. 𝑂 a
None) ((a -> b -> m (𝑂 c)) -> d a -> d b -> m (d c))
-> (a -> b -> m (𝑂 c)) -> d a -> d b -> m (d c)
forall a b. (a -> b) -> a -> b
$ (c -> 𝑂 c) -> m c -> m (𝑂 c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map c -> 𝑂 c
forall a. a -> 𝑂 a
Some (m c -> m (𝑂 c)) -> (a -> b -> m c) -> a -> b -> m (𝑂 c)
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> b -> m c
f
dict ∷ ∀ d t a k s. (Dict k s d,ToIter (d a) t) ⇒ t → d a
dict :: forall (d :: * -> *) t a k s.
(Dict k s d, ToIter (d a) t) =>
t -> d a
dict = d a -> (d a -> d a -> d a) -> t -> d a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
foldr d a
forall a. d a
forall k s (d :: * -> *) a. Dict k s d => d a
dø d a -> d a -> d a
forall a. d a -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => d a -> d a -> d a
(⩌)
assoc ∷ ∀ d t a k s. (Dict k s d,ToIter (k ∧ a) t) ⇒ t → d a
assoc :: forall (d :: * -> *) t a k s.
(Dict k s d, ToIter (k ∧ a) t) =>
t -> d a
assoc = d a -> ((k ∧ a) -> d a -> d a) -> t -> d a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
foldr d a
forall a. d a
forall k s (d :: * -> *) a. Dict k s d => d a
dø (((k ∧ a) -> d a -> d a) -> t -> d a)
-> ((k ∧ a) -> d a -> d a) -> t -> d a
forall a b. (a -> b) -> a -> b
$ (k -> a -> d a -> d a) -> (k ∧ a) -> d a -> d a
forall a b c. (a -> b -> c) -> (a ∧ b) -> c
curry k -> a -> d a -> d a
forall a. k -> a -> d a -> d a
forall k s (d :: * -> *) a. Dict k s d => k -> a -> d a -> d a
dadd
dø𝐷 ∷ ∀ k a. k ⇰ a
dø𝐷 :: forall k a. k ⇰ a
dø𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a) Map k a
forall k a. Map k a
Map.empty
(↦♭) ∷ ∀ k a. k → a → k ⇰ a
↦♭ :: forall k a. k -> a -> k ⇰ a
(↦♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → a → Map.Map k a) k -> a -> Map k a
forall k a. k -> a -> Map k a
Map.singleton
dadd𝐷 ∷ ∀ k a. (Ord k) ⇒ k → a → k ⇰ a → k ⇰ a
dadd𝐷 :: forall k a. Ord k => k -> a -> (k ⇰ a) -> k ⇰ a
dadd𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → a → Map.Map k a → Map.Map k a) k -> a -> Map k a -> Map k a
forall k a. Ord k => k -> a -> Map k a -> Map k a
Map.insert
drem𝐷 ∷ ∀ k a. (Ord k) ⇒ k → k ⇰ a → k ⇰ a
drem𝐷 :: forall k a. Ord k => k -> (k ⇰ a) -> k ⇰ a
drem𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → Map.Map k a → Map.Map k a) k -> Map k a -> Map k a
forall k a. Ord k => k -> Map k a -> Map k a
Map.delete
dupd𝐷 ∷ ∀ k a. (Ord k) ⇒ k → (a → 𝑂 a) → k ⇰ a → k ⇰ a
dupd𝐷 :: forall k a. Ord k => k -> (a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
dupd𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → (a → 𝑂 a) → Map.Map k a → Map.Map k a) ((k -> (a -> 𝑂 a) -> Map k a -> Map k a)
-> k -> (a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a)
-> (k -> (a -> 𝑂 a) -> Map k a -> Map k a)
-> k
-> (a -> 𝑂 a)
-> (k ⇰ a)
-> k ⇰ a
forall a b. (a -> b) -> a -> b
$ \ k
k a -> 𝑂 a
f → ((a -> Maybe a) -> k -> Map k a -> Map k a)
-> k -> (a -> Maybe a) -> Map k a -> Map k a
forall a b c. (a -> b -> c) -> b -> a -> c
flip (a -> Maybe a) -> k -> Map k a -> Map k a
forall k a. Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a
Map.update k
k ((a -> Maybe a) -> Map k a -> Map k a)
-> (a -> Maybe a) -> Map k a -> Map k a
forall a b. (a -> b) -> a -> b
$ 𝑂 a -> Maybe a
forall a b. CHS a b => a -> b
tohs (𝑂 a -> Maybe a) -> (a -> 𝑂 a) -> a -> Maybe a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ a -> 𝑂 a
f
dlteBy𝐷 ∷ ∀ k a. (Ord k) ⇒ (a → a → 𝔹) → k ⇰ a → k ⇰ a → 𝔹
dlteBy𝐷 :: forall k a. Ord k => (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
dlteBy𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → a → 𝔹) → Map.Map k a → Map.Map k a → 𝔹) (a -> a -> 𝔹) -> Map k a -> Map k a -> 𝔹
forall k a b. Ord k => (a -> b -> 𝔹) -> Map k a -> Map k b -> 𝔹
Map.isSubmapOfBy
dunionBy𝐷 ∷ ∀ k a. (Ord k) ⇒ (a → a → a) → k ⇰ a → k ⇰ a → k ⇰ a
dunionBy𝐷 :: forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → a → a) → Map.Map k a → Map.Map k a → Map.Map k a) (a -> a -> a) -> Map k a -> Map k a -> Map k a
forall k a. Ord k => (a -> a -> a) -> Map k a -> Map k a -> Map k a
Map.unionWith
dinterBy𝐷 ∷ ∀ k a b c. (Ord k) ⇒ (a → b → c) → k ⇰ a → k ⇰ b → k ⇰ c
dinterBy𝐷 :: forall k a b c.
Ord k =>
(a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
dinterBy𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → b → c) → Map.Map k a → Map.Map k b → Map.Map k c) (((a -> b -> c) -> Map k a -> Map k b -> Map k c)
-> (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c)
-> ((a -> b -> c) -> Map k a -> Map k b -> Map k c)
-> (a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall a b. (a -> b) -> a -> b
$ (a -> b -> c) -> Map k a -> Map k b -> Map k c
forall k a b c.
Ord k =>
(a -> b -> c) -> Map k a -> Map k b -> Map k c
Map.intersectionWith
dsdiffBy𝐷 ∷ ∀ k b a. (Ord k) ⇒ (a → b → 𝑂 a) → k ⇰ a → k ⇰ b → k ⇰ a
dsdiffBy𝐷 :: forall k b a.
Ord k =>
(a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a
dsdiffBy𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → b → 𝑂 a) → Map.Map k a → Map.Map k b → Map.Map k a) (((a -> b -> 𝑂 a) -> Map k a -> Map k b -> Map k a)
-> (a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a)
-> ((a -> b -> 𝑂 a) -> Map k a -> Map k b -> Map k a)
-> (a -> b -> 𝑂 a)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ a
forall a b. (a -> b) -> a -> b
$ \ a -> b -> 𝑂 a
f → (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
forall k a b.
Ord k =>
(a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
Map.differenceWith ((a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a)
-> (a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
forall a b. (a -> b) -> a -> b
$ 𝑂 a -> Maybe a
forall a b. CHS a b => a -> b
tohs (𝑂 a -> Maybe a) -> (a -> b -> 𝑂 a) -> a -> b -> Maybe a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> b -> 𝑂 a
f
(⋿♭) ∷ ∀ k a. (Ord k) ⇒ k → k ⇰ a → 𝔹
⋿♭ :: forall k a. Ord k => k -> (k ⇰ a) -> 𝔹
(⋿♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → Map.Map k a → 𝔹) k -> Map k a -> 𝔹
forall k a. Ord k => k -> Map k a -> 𝔹
Map.member
(⫑♭) ∷ ∀ k a. (Ord k,Eq a) ⇒ k ⇰ a → k ⇰ a → 𝔹
⫑♭ :: forall k a. (Ord k, Eq a) => (k ⇰ a) -> (k ⇰ a) -> 𝔹
(⫑♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → Map.Map k a → 𝔹) Map k a -> Map k a -> 𝔹
forall k a. (Ord k, Eq a) => Map k a -> Map k a -> 𝔹
Map.isSubmapOf
(⩌♭) ∷ ∀ k a. (Ord k) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
⩌♭ :: forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩌♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → Map.Map k a → Map.Map k a) Map k a -> Map k a -> Map k a
forall k a. Ord k => Map k a -> Map k a -> Map k a
Map.union
(⩍♭) ∷ ∀ k a. (Ord k) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
⩍♭ :: forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩍♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → Map.Map k a → Map.Map k a) Map k a -> Map k a -> Map k a
forall k a b. Ord k => Map k a -> Map k b -> Map k a
Map.intersection
(⧅♭) ∷ ∀ k a. (Ord k,Eq a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
⧅♭ :: forall k a. (Ord k, Eq a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⧅♭) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → Map.Map k a → Map.Map k a) ((Map k a -> Map k a -> Map k a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a)
-> (Map k a -> Map k a -> Map k a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ (a -> a -> Maybe a) -> Map k a -> Map k a -> Map k a
forall k a b.
Ord k =>
(a -> b -> Maybe a) -> Map k a -> Map k b -> Map k a
Map.differenceWith ((a -> a -> Maybe a) -> Map k a -> Map k a -> Map k a)
-> (a -> a -> Maybe a) -> Map k a -> Map k a -> Map k a
forall a b. (a -> b) -> a -> b
$ \ a
x a
y →
if a
x a -> a -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ a
y then Maybe a
forall a. Maybe a
HS.Nothing else a -> Maybe a
forall a. a -> Maybe a
HS.Just a
x
dminView𝐷 ∷ ∀ k a. k ⇰ a → 𝑂 (k ∧ a ∧ (k ⇰ a))
dminView𝐷 :: forall k a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dminView𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝑂 (k ∧ a ∧ Map.Map k a)) ((Map k a -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a)))
-> (Map k a -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (k ⇰ a)
-> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
forall a b. (a -> b) -> a -> b
$
Maybe ((k, a), Map k a) -> 𝑂 ((k ∧ a) ∧ Map k a)
forall a b. CHS a b => b -> a
frhs (Maybe ((k, a), Map k a) -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (Map k a -> Maybe ((k, a), Map k a))
-> Map k a
-> 𝑂 ((k ∧ a) ∧ Map k a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> Maybe ((k, a), Map k a)
forall k a. Map k a -> Maybe ((k, a), Map k a)
Map.minViewWithKey
dmaxView𝐷 ∷ ∀ k a. k ⇰ a → 𝑂 (k ∧ a ∧ (k ⇰ a))
dmaxView𝐷 :: forall k a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dmaxView𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝑂 (k ∧ a ∧ Map.Map k a)) ((Map k a -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a)))
-> (Map k a -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (k ⇰ a)
-> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
forall a b. (a -> b) -> a -> b
$
Maybe ((k, a), Map k a) -> 𝑂 ((k ∧ a) ∧ Map k a)
forall a b. CHS a b => b -> a
frhs (Maybe ((k, a), Map k a) -> 𝑂 ((k ∧ a) ∧ Map k a))
-> (Map k a -> Maybe ((k, a), Map k a))
-> Map k a
-> 𝑂 ((k ∧ a) ∧ Map k a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> Maybe ((k, a), Map k a)
forall k a. Map k a -> Maybe ((k, a), Map k a)
Map.maxViewWithKey
dkeyView𝐷 ∷ ∀ k a. (Ord k) ⇒ k → k ⇰ a → 𝑂 (a ∧ (k ⇰ a))
dkeyView𝐷 :: forall k a. Ord k => k -> (k ⇰ a) -> 𝑂 (a ∧ (k ⇰ a))
dkeyView𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → Map.Map k a → 𝑂 (a ∧ Map.Map k a)) ((k -> Map k a -> 𝑂 (a ∧ Map k a))
-> k -> (k ⇰ a) -> 𝑂 (a ∧ (k ⇰ a)))
-> (k -> Map k a -> 𝑂 (a ∧ Map k a))
-> k
-> (k ⇰ a)
-> 𝑂 (a ∧ (k ⇰ a))
forall a b. (a -> b) -> a -> b
$ \ k
k Map k a
d →
let 𝑂 a
xM :* Map k a
d' = (Maybe a, Map k a) -> 𝑂 a ∧ Map k a
forall a b. CHS a b => b -> a
frhs ((Maybe a, Map k a) -> 𝑂 a ∧ Map k a)
-> (Maybe a, Map k a) -> 𝑂 a ∧ Map k a
forall a b. (a -> b) -> a -> b
$ (k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a)
forall k a.
Ord k =>
(k -> a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a)
Map.updateLookupWithKey ((a -> Maybe a) -> k -> a -> Maybe a
forall a b. a -> b -> a
const ((a -> Maybe a) -> k -> a -> Maybe a)
-> (a -> Maybe a) -> k -> a -> Maybe a
forall a b. (a -> b) -> a -> b
$ Maybe a -> a -> Maybe a
forall a b. a -> b -> a
const Maybe a
forall a. Maybe a
HS.Nothing) k
k Map k a
d
in (a -> a ∧ Map k a) -> 𝑂 a -> 𝑂 (a ∧ Map k a)
forall a b. (a -> b) -> 𝑂 a -> 𝑂 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (a -> Map k a -> a ∧ Map k a
forall a b. a -> b -> a ∧ b
:* Map k a
d') 𝑂 a
xM
dminElem𝐷 ∷ ∀ k a. k ⇰ a → 𝑂 (k ∧ a)
dminElem𝐷 :: forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dminElem𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝑂 (k ∧ a)) ((Map k a -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 (k ∧ a))
-> (Map k a -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 (k ∧ a)
forall a b. (a -> b) -> a -> b
$ Maybe (k, a) -> 𝑂 (k ∧ a)
forall a b. CHS a b => b -> a
frhs (Maybe (k, a) -> 𝑂 (k ∧ a))
-> (Map k a -> Maybe (k, a)) -> Map k a -> 𝑂 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> Maybe (k, a)
forall k a. Map k a -> Maybe (k, a)
Map.lookupMin
dmaxElem𝐷 ∷ ∀ k a. k ⇰ a → 𝑂 (k ∧ a)
dmaxElem𝐷 :: forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dmaxElem𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝑂 (k ∧ a)) ((Map k a -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 (k ∧ a))
-> (Map k a -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 (k ∧ a)
forall a b. (a -> b) -> a -> b
$ Maybe (k, a) -> 𝑂 (k ∧ a)
forall a b. CHS a b => b -> a
frhs (Maybe (k, a) -> 𝑂 (k ∧ a))
-> (Map k a -> Maybe (k, a)) -> Map k a -> 𝑂 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> Maybe (k, a)
forall k a. Map k a -> Maybe (k, a)
Map.lookupMax
dkeep𝐷 ∷ ∀ k a. (Ord k) ⇒ 𝑃 k → k ⇰ a → k ⇰ a
dkeep𝐷 :: forall k a. Ord k => 𝑃 k -> (k ⇰ a) -> k ⇰ a
dkeep𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Set.Set k → Map.Map k a → Map.Map k a) ((Set k -> Map k a -> Map k a) -> 𝑃 k -> (k ⇰ a) -> k ⇰ a)
-> (Set k -> Map k a -> Map k a) -> 𝑃 k -> (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ (Map k a -> Set k -> Map k a) -> Set k -> Map k a -> Map k a
forall a b c. (a -> b -> c) -> b -> a -> c
flip Map k a -> Set k -> Map k a
forall k a. Ord k => Map k a -> Set k -> Map k a
Map.restrictKeys
dtoss𝐷 ∷ ∀ k a. (Ord k) ⇒ 𝑃 k → k ⇰ a → k ⇰ a
dtoss𝐷 :: forall k a. Ord k => 𝑃 k -> (k ⇰ a) -> k ⇰ a
dtoss𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Set.Set k → Map.Map k a → Map.Map k a) ((Set k -> Map k a -> Map k a) -> 𝑃 k -> (k ⇰ a) -> k ⇰ a)
-> (Set k -> Map k a -> Map k a) -> 𝑃 k -> (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ (Map k a -> Set k -> Map k a) -> Set k -> Map k a -> Map k a
forall a b c. (a -> b -> c) -> b -> a -> c
flip Map k a -> Set k -> Map k a
forall k a. Ord k => Map k a -> Set k -> Map k a
Map.withoutKeys
dict𝐼𝐷 ∷ ∀ k a. (Ord k) ⇒ 𝐼 (k ∧ a) → k ⇰ a
dict𝐼𝐷 :: forall k a. Ord k => 𝐼 (k ∧ a) -> k ⇰ a
dict𝐼𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a) (Map k a -> k ⇰ a) -> ([(k, a)] -> Map k a) -> [(k, a)] -> k ⇰ a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ [(k, a)] -> Map k a
forall k a. Ord k => [(k, a)] -> Map k a
Map.fromList ([(k, a)] -> k ⇰ a) -> (𝐼 (k, a) -> [(k, a)]) -> 𝐼 (k, a) -> k ⇰ a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝐼 (k, a) -> [(k, a)]
forall a t. ToIter a t => t -> [a]
lazyList (𝐼 (k, a) -> k ⇰ a)
-> (𝐼 (k ∧ a) -> 𝐼 (k, a)) -> 𝐼 (k ∧ a) -> k ⇰ a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ((k ∧ a) -> (k, a)) -> 𝐼 (k ∧ a) -> 𝐼 (k, a)
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> (k, a)
forall a b. CHS a b => a -> b
tohs
dkeys𝐷 ∷ ∀ k a. (Ord k) ⇒ k ⇰ a → 𝑃 k
dkeys𝐷 :: forall k a. Ord k => (k ⇰ a) -> 𝑃 k
dkeys𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → Set.Set k) Map k a -> Set k
forall k a. Map k a -> Set k
Map.keysSet
dvals𝐷 ∷ ∀ k a. k ⇰ a → 𝐼 a
dvals𝐷 :: forall k a. (k ⇰ a) -> 𝐼 a
dvals𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝐼 a) ((Map k a -> 𝐼 a) -> (k ⇰ a) -> 𝐼 a)
-> (Map k a -> 𝐼 a) -> (k ⇰ a) -> 𝐼 a
forall a b. (a -> b) -> a -> b
$ [a] -> 𝐼 a
forall a t. ToIter a t => t -> 𝐼 a
iter ([a] -> 𝐼 a) -> (Map k a -> [a]) -> Map k a -> 𝐼 a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> [a]
forall k a. Map k a -> [a]
Map.elems
mapM𝐷 ∷ ∀ m k a b. (Monad m) ⇒ (a → m b) → k ⇰ a → m (k ⇰ b)
mapM𝐷 :: forall (m :: * -> *) k a b.
Monad m =>
(a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
mapM𝐷 = W (Monad m)
-> (Monad m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (Monad m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (FCoercible m => (a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → m b) → Map.Map k a → m (Map.Map k b)) (a -> m b) -> Map k a -> m (Map k b)
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> Map k a -> m (Map k b)
HS.mapM
omapM𝐷 ∷ ∀ m k a b. (Monad m) ⇒ (a → m (𝑂 b)) → k ⇰ a → m (k ⇰ b)
omapM𝐷 :: forall (m :: * -> *) k a b.
Monad m =>
(a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
omapM𝐷 = W (Monad m)
-> (Monad m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (Monad m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (FCoercible m => (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → m (𝑂 b)) → Map.Map k a → m (Map.Map k b)) (((a -> m (𝑂 b)) -> Map k a -> m (Map k b))
-> (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> ((a -> m (𝑂 b)) -> Map k a -> m (Map k b))
-> (a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
$ \ a -> m (𝑂 b)
f →
(k -> a -> m (Maybe b)) -> Map k a -> m (Map k b)
forall (f :: * -> *) k a b.
Applicative f =>
(k -> a -> f (Maybe b)) -> Map k a -> f (Map k b)
Map.traverseMaybeWithKey ((k -> a -> m (Maybe b)) -> Map k a -> m (Map k b))
-> (k -> a -> m (Maybe b)) -> Map k a -> m (Map k b)
forall a b. (a -> b) -> a -> b
$ (a -> m (Maybe b)) -> k -> a -> m (Maybe b)
forall a b. a -> b -> a
const ((a -> m (Maybe b)) -> k -> a -> m (Maybe b))
-> (a -> m (Maybe b)) -> k -> a -> m (Maybe b)
forall a b. (a -> b) -> a -> b
$ (𝑂 b -> Maybe b) -> m (𝑂 b) -> m (Maybe b)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 b -> Maybe b
forall a b. CHS a b => a -> b
tohs (m (𝑂 b) -> m (Maybe b)) -> (a -> m (𝑂 b)) -> a -> m (Maybe b)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ a -> m (𝑂 b)
f
kmapM𝐷 ∷ ∀ m k a b. (Monad m) ⇒ (k → a → m b) → k ⇰ a → m (k ⇰ b)
kmapM𝐷 :: forall (m :: * -> *) k a b.
Monad m =>
(k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
kmapM𝐷 = W (Monad m)
-> (Monad m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (Monad m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (FCoercible m => (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m b)
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → m b) → Map.Map k a → m (Map.Map k b)) (k -> a -> m b) -> Map k a -> m (Map k b)
forall (t :: * -> *) k a b.
Applicative t =>
(k -> a -> t b) -> Map k a -> t (Map k b)
Map.traverseWithKey
kmapAtM𝐷 ∷ ∀ m k a. (Monad m,Ord k) ⇒ k → (a → m a) → k ⇰ a → m (k ⇰ a)
kmapAtM𝐷 :: forall (m :: * -> *) k a.
(Monad m, Ord k) =>
k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a)
kmapAtM𝐷 = W (Monad m)
-> (Monad m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (a -> m a)
-> (k ⇰ a)
-> m (k ⇰ a)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> (Monad m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (a -> m a)
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (a -> m a)
-> (k ⇰ a)
-> m (k ⇰ a)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> (FCoercible m => k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (a -> m a)
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → (a → m a) → Map.Map k a → m (Map.Map k a)) ((k -> (a -> m a) -> Map k a -> m (Map k a))
-> k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a))
-> (k -> (a -> m a) -> Map k a -> m (Map k a))
-> k
-> (a -> m a)
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ \ k
k a -> m a
f →
((Maybe a -> m (Maybe a)) -> k -> Map k a -> m (Map k a))
-> k -> (Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a)
forall a b c. (a -> b -> c) -> b -> a -> c
flip (Maybe a -> m (Maybe a)) -> k -> Map k a -> m (Map k a)
forall (f :: * -> *) k a.
(Functor f, Ord k) =>
(Maybe a -> f (Maybe a)) -> k -> Map k a -> f (Map k a)
Map.alterF k
k ((Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a))
-> (Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a)
forall a b. (a -> b) -> a -> b
$ \case
Maybe a
HS.Nothing → Maybe a -> m (Maybe a)
forall a. a -> m a
forall (m :: * -> *) a. Return m => a -> m a
return Maybe a
forall a. Maybe a
HS.Nothing
HS.Just a
x → a -> Maybe a
forall a. a -> Maybe a
HS.Just (a -> Maybe a) -> m a -> m (Maybe a)
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
^$ a -> m a
f a
x
okmapM𝐷 ∷ ∀ m k a b. (Monad m) ⇒ (k → a → m (𝑂 b)) → k ⇰ a → m (k ⇰ b)
okmapM𝐷 :: forall (m :: * -> *) k a b.
Monad m =>
(k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
okmapM𝐷 = W (Monad m)
-> (Monad m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (Monad m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (FCoercible m => (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> (k -> a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → m (𝑂 b)) → Map.Map k a → m (Map.Map k b)) (((k -> a -> m (𝑂 b)) -> Map k a -> m (Map k b))
-> (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b))
-> ((k -> a -> m (𝑂 b)) -> Map k a -> m (Map k b))
-> (k -> a -> m (𝑂 b))
-> (k ⇰ a)
-> m (k ⇰ b)
forall a b. (a -> b) -> a -> b
$ \ k -> a -> m (𝑂 b)
f →
(k -> a -> m (Maybe b)) -> Map k a -> m (Map k b)
forall (f :: * -> *) k a b.
Applicative f =>
(k -> a -> f (Maybe b)) -> Map k a -> f (Map k b)
Map.traverseMaybeWithKey ((k -> a -> m (Maybe b)) -> Map k a -> m (Map k b))
-> (k -> a -> m (Maybe b)) -> Map k a -> m (Map k b)
forall a b. (a -> b) -> a -> b
$ (𝑂 b -> Maybe b) -> m (𝑂 b) -> m (Maybe b)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 b -> Maybe b
forall a b. CHS a b => a -> b
tohs (m (𝑂 b) -> m (Maybe b))
-> (k -> a -> m (𝑂 b)) -> k -> a -> m (Maybe b)
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> a -> m (𝑂 b)
f
okmapAtM𝐷 ∷ ∀ m k a. (Monad m,Ord k) ⇒ k → (𝑂 a → m (𝑂 a)) → k ⇰ a → m (k ⇰ a)
okmapAtM𝐷 :: forall (m :: * -> *) k a.
(Monad m, Ord k) =>
k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a)
okmapAtM𝐷 = W (Monad m)
-> (Monad m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (𝑂 a -> m (𝑂 a))
-> (k ⇰ a)
-> m (k ⇰ a)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> (Monad m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (𝑂 a -> m (𝑂 a))
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (𝑂 a -> m (𝑂 a))
-> (k ⇰ a)
-> m (k ⇰ a)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> (FCoercible m => k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> k
-> (𝑂 a -> m (𝑂 a))
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → (𝑂 a → m (𝑂 a)) → Map.Map k a → m (Map.Map k a)) ((k -> (𝑂 a -> m (𝑂 a)) -> Map k a -> m (Map k a))
-> k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a))
-> (k -> (𝑂 a -> m (𝑂 a)) -> Map k a -> m (Map k a))
-> k
-> (𝑂 a -> m (𝑂 a))
-> (k ⇰ a)
-> m (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ \ k
k 𝑂 a -> m (𝑂 a)
f →
((Maybe a -> m (Maybe a)) -> k -> Map k a -> m (Map k a))
-> k -> (Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a)
forall a b c. (a -> b -> c) -> b -> a -> c
flip (Maybe a -> m (Maybe a)) -> k -> Map k a -> m (Map k a)
forall (f :: * -> *) k a.
(Functor f, Ord k) =>
(Maybe a -> f (Maybe a)) -> k -> Map k a -> f (Map k a)
Map.alterF k
k ((Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a))
-> (Maybe a -> m (Maybe a)) -> Map k a -> m (Map k a)
forall a b. (a -> b) -> a -> b
$ 𝑂 a -> Maybe a
forall a b. CHS a b => a -> b
tohs (𝑂 a -> Maybe a) -> (𝑂 a -> m (𝑂 a)) -> 𝑂 a -> m (Maybe a)
forall (t :: * -> *) b c a.
Functor t =>
(b -> c) -> (a -> t b) -> a -> t c
^∘ 𝑂 a -> m (𝑂 a)
f (𝑂 a -> m (Maybe a)) -> (Maybe a -> 𝑂 a) -> Maybe a -> m (Maybe a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Maybe a -> 𝑂 a
forall a b. CHS a b => b -> a
frhs
bimapM𝐷 ∷ ∀ m k a b c. (Monad m,Ord k) ⇒ (a → m c) → (b → m c) → (a → b → m c) → k ⇰ a → k ⇰ b → m (k ⇰ c)
bimapM𝐷 :: forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(a -> m c)
-> (b -> m c) -> (a -> b -> m c) -> (k ⇰ a) -> (k ⇰ b) -> m (k ⇰ c)
bimapM𝐷 = W (Monad m)
-> (Monad m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (Monad m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (FCoercible m =>
(a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → m c) → (b → m c) → (a → b → m c) → Map.Map k a → Map.Map k b → m (Map.Map k c)) (((a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> Map k a
-> Map k b
-> m (Map k c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> ((a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> Map k a
-> Map k b
-> m (Map k c))
-> (a -> m c)
-> (b -> m c)
-> (a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
$ \ a -> m c
f₁ b -> m c
f₂ a -> b -> m c
f₃ →
WhenMissing m k a c
-> WhenMissing m k b c
-> WhenMatched m k a b c
-> Map k a
-> Map k b
-> m (Map k c)
forall (f :: * -> *) k a c b.
(Applicative f, Ord k) =>
WhenMissing f k a c
-> WhenMissing f k b c
-> WhenMatched f k a b c
-> Map k a
-> Map k b
-> f (Map k c)
Map.mergeA ((k -> a -> m c) -> WhenMissing m k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f y) -> WhenMissing f k x y
Map.traverseMissing ((k -> a -> m c) -> WhenMissing m k a c)
-> (k -> a -> m c) -> WhenMissing m k a c
forall a b. (a -> b) -> a -> b
$ (a -> m c) -> k -> a -> m c
forall a b. a -> b -> a
const a -> m c
f₁)
((k -> b -> m c) -> WhenMissing m k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f y) -> WhenMissing f k x y
Map.traverseMissing ((k -> b -> m c) -> WhenMissing m k b c)
-> (k -> b -> m c) -> WhenMissing m k b c
forall a b. (a -> b) -> a -> b
$ (b -> m c) -> k -> b -> m c
forall a b. a -> b -> a
const b -> m c
f₂) (WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c))
-> WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c)
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> m c) -> WhenMatched m k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> f z) -> WhenMatched f k x y z
Map.zipWithAMatched ((k -> a -> b -> m c) -> WhenMatched m k a b c)
-> (k -> a -> b -> m c) -> WhenMatched m k a b c
forall a b. (a -> b) -> a -> b
$ (a -> b -> m c) -> k -> a -> b -> m c
forall a b. a -> b -> a
const a -> b -> m c
f₃
obimapM𝐷 ∷ ∀ m k a b c. (Monad m,Ord k) ⇒ (a → m (𝑂 c)) → (b → m (𝑂 c)) → (a → b → m (𝑂 c)) → k ⇰ a → k ⇰ b → m (k ⇰ c)
obimapM𝐷 :: forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
obimapM𝐷 = W (Monad m)
-> (Monad m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (Monad m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (FCoercible m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → m (𝑂 c)) → (b → m (𝑂 c)) → (a → b → m (𝑂 c)) → Map.Map k a → Map.Map k b → m (Map.Map k c)) (((a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> Map k a
-> Map k b
-> m (Map k c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> ((a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> Map k a
-> Map k b
-> m (Map k c))
-> (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
$ \ a -> m (𝑂 c)
f₁ b -> m (𝑂 c)
f₂ a -> b -> m (𝑂 c)
f₃ →
WhenMissing m k a c
-> WhenMissing m k b c
-> WhenMatched m k a b c
-> Map k a
-> Map k b
-> m (Map k c)
forall (f :: * -> *) k a c b.
(Applicative f, Ord k) =>
WhenMissing f k a c
-> WhenMissing f k b c
-> WhenMatched f k a b c
-> Map k a
-> Map k b
-> f (Map k c)
Map.mergeA ((k -> a -> m (Maybe c)) -> WhenMissing m k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f (Maybe y)) -> WhenMissing f k x y
Map.traverseMaybeMissing ((k -> a -> m (Maybe c)) -> WhenMissing m k a c)
-> (k -> a -> m (Maybe c)) -> WhenMissing m k a c
forall a b. (a -> b) -> a -> b
$ (a -> m (Maybe c)) -> k -> a -> m (Maybe c)
forall a b. a -> b -> a
const ((a -> m (Maybe c)) -> k -> a -> m (Maybe c))
-> (a -> m (Maybe c)) -> k -> a -> m (Maybe c)
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c)) -> (a -> m (𝑂 c)) -> a -> m (Maybe c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ a -> m (𝑂 c)
f₁)
((k -> b -> m (Maybe c)) -> WhenMissing m k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f (Maybe y)) -> WhenMissing f k x y
Map.traverseMaybeMissing ((k -> b -> m (Maybe c)) -> WhenMissing m k b c)
-> (k -> b -> m (Maybe c)) -> WhenMissing m k b c
forall a b. (a -> b) -> a -> b
$ (b -> m (Maybe c)) -> k -> b -> m (Maybe c)
forall a b. a -> b -> a
const ((b -> m (Maybe c)) -> k -> b -> m (Maybe c))
-> (b -> m (Maybe c)) -> k -> b -> m (Maybe c)
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c)) -> (b -> m (𝑂 c)) -> b -> m (Maybe c)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ b -> m (𝑂 c)
f₂) (WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c))
-> WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c)
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> f (Maybe z)) -> WhenMatched f k x y z
Map.zipWithMaybeAMatched ((k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c)
-> (k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c
forall a b. (a -> b) -> a -> b
$ (a -> b -> m (Maybe c)) -> k -> a -> b -> m (Maybe c)
forall a b. a -> b -> a
const ((a -> b -> m (Maybe c)) -> k -> a -> b -> m (Maybe c))
-> (a -> b -> m (Maybe c)) -> k -> a -> b -> m (Maybe c)
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c))
-> (a -> b -> m (𝑂 c)) -> a -> b -> m (Maybe c)
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> b -> m (𝑂 c)
f₃
kbimapM𝐷 ∷ ∀ m k a b c. (Monad m,Ord k) ⇒ (k → a → m c) → (k → b → m c) → (k → a → b → m c) → k ⇰ a → k ⇰ b → m (k ⇰ c)
kbimapM𝐷 :: forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
kbimapM𝐷 = W (Monad m)
-> (Monad m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (Monad m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (FCoercible m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → m c) → (k → b → m c) → (k → a → b → m c) → Map.Map k a → Map.Map k b → m (Map.Map k c)) (((k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> Map k a
-> Map k b
-> m (Map k c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> ((k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> Map k a
-> Map k b
-> m (Map k c))
-> (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
$ \ k -> a -> m c
f₁ k -> b -> m c
f₂ k -> a -> b -> m c
f₃ →
WhenMissing m k a c
-> WhenMissing m k b c
-> WhenMatched m k a b c
-> Map k a
-> Map k b
-> m (Map k c)
forall (f :: * -> *) k a c b.
(Applicative f, Ord k) =>
WhenMissing f k a c
-> WhenMissing f k b c
-> WhenMatched f k a b c
-> Map k a
-> Map k b
-> f (Map k c)
Map.mergeA ((k -> a -> m c) -> WhenMissing m k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f y) -> WhenMissing f k x y
Map.traverseMissing k -> a -> m c
f₁)
((k -> b -> m c) -> WhenMissing m k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f y) -> WhenMissing f k x y
Map.traverseMissing k -> b -> m c
f₂) (WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c))
-> WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c)
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> m c) -> WhenMatched m k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> f z) -> WhenMatched f k x y z
Map.zipWithAMatched k -> a -> b -> m c
f₃
okbimapM𝐷 ∷ ∀ m k a b c. (Monad m,Ord k) ⇒ (k → a → m (𝑂 c)) → (k → b → m (𝑂 c)) → (k → a → b → m (𝑂 c)) → k ⇰ a → k ⇰ b → m (k ⇰ c)
okbimapM𝐷 :: forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
okbimapM𝐷 = W (Monad m)
-> (Monad m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall (m :: * -> *). Monad m => W (Monad m)
tohsMonad @m) ((Monad m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (Monad m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$ W (FCoercible m)
-> (FCoercible m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (FCoercible m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
HS.$
forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → m (𝑂 c)) → (k → b → m (𝑂 c)) → (k → a → b → m (𝑂 c)) → Map.Map k a → Map.Map k b → m (Map.Map k c)) (((k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> Map k a
-> Map k b
-> m (Map k c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c))
-> ((k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> Map k a
-> Map k b
-> m (Map k c))
-> (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall a b. (a -> b) -> a -> b
$ \ k -> a -> m (𝑂 c)
f₁ k -> b -> m (𝑂 c)
f₂ k -> a -> b -> m (𝑂 c)
f₃ →
WhenMissing m k a c
-> WhenMissing m k b c
-> WhenMatched m k a b c
-> Map k a
-> Map k b
-> m (Map k c)
forall (f :: * -> *) k a c b.
(Applicative f, Ord k) =>
WhenMissing f k a c
-> WhenMissing f k b c
-> WhenMatched f k a b c
-> Map k a
-> Map k b
-> f (Map k c)
Map.mergeA ((k -> a -> m (Maybe c)) -> WhenMissing m k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f (Maybe y)) -> WhenMissing f k x y
Map.traverseMaybeMissing ((k -> a -> m (Maybe c)) -> WhenMissing m k a c)
-> (k -> a -> m (Maybe c)) -> WhenMissing m k a c
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c))
-> (k -> a -> m (𝑂 c)) -> k -> a -> m (Maybe c)
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> a -> m (𝑂 c)
f₁)
((k -> b -> m (Maybe c)) -> WhenMissing m k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> f (Maybe y)) -> WhenMissing f k x y
Map.traverseMaybeMissing ((k -> b -> m (Maybe c)) -> WhenMissing m k b c)
-> (k -> b -> m (Maybe c)) -> WhenMissing m k b c
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c))
-> (k -> b -> m (𝑂 c)) -> k -> b -> m (Maybe c)
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> b -> m (𝑂 c)
f₂) (WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c))
-> WhenMatched m k a b c -> Map k a -> Map k b -> m (Map k c)
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> f (Maybe z)) -> WhenMatched f k x y z
Map.zipWithMaybeAMatched ((k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c)
-> (k -> a -> b -> m (Maybe c)) -> WhenMatched m k a b c
forall a b. (a -> b) -> a -> b
$ (𝑂 c -> Maybe c) -> m (𝑂 c) -> m (Maybe c)
forall a b. (a -> b) -> m a -> m b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (m (𝑂 c) -> m (Maybe c))
-> (k -> a -> b -> m (𝑂 c)) -> k -> a -> b -> m (Maybe c)
forall d e a b c.
(d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
∘∘∘ k -> a -> b -> m (𝑂 c)
f₃
map𝐷 ∷ ∀ k a b. (a → b) → k ⇰ a → k ⇰ b
map𝐷 :: forall k a b. (a -> b) -> (k ⇰ a) -> k ⇰ b
map𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → b) → Map.Map k a → Map.Map k b) (a -> b) -> Map k a -> Map k b
forall a b k. (a -> b) -> Map k a -> Map k b
Map.map
omap𝐷 ∷ ∀ k a b. (a → 𝑂 b) → k ⇰ a → k ⇰ b
omap𝐷 :: forall k a b. (a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
omap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → 𝑂 b) → Map.Map k a → Map.Map k b) (((a -> 𝑂 b) -> Map k a -> Map k b)
-> (a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b)
-> ((a -> 𝑂 b) -> Map k a -> Map k b)
-> (a -> 𝑂 b)
-> (k ⇰ a)
-> k ⇰ b
forall a b. (a -> b) -> a -> b
$ \ a -> 𝑂 b
f → (a -> Maybe b) -> Map k a -> Map k b
forall a b k. (a -> Maybe b) -> Map k a -> Map k b
Map.mapMaybe ((a -> Maybe b) -> Map k a -> Map k b)
-> (a -> Maybe b) -> Map k a -> Map k b
forall a b. (a -> b) -> a -> b
$ 𝑂 b -> Maybe b
forall a b. CHS a b => a -> b
tohs (𝑂 b -> Maybe b) -> (a -> 𝑂 b) -> a -> Maybe b
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ a -> 𝑂 b
f
kmap𝐷 ∷ ∀ k a b. (k → a → b) → k ⇰ a → k ⇰ b
kmap𝐷 :: forall k a b. (k -> a -> b) -> (k ⇰ a) -> k ⇰ b
kmap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → b) → Map.Map k a → Map.Map k b) (k -> a -> b) -> Map k a -> Map k b
forall k a b. (k -> a -> b) -> Map k a -> Map k b
Map.mapWithKey
kmapAt𝐷 ∷ ∀ k a. (Ord k) ⇒ k → (a → a) → k ⇰ a → k ⇰ a
kmapAt𝐷 :: forall k a. Ord k => k -> (a -> a) -> (k ⇰ a) -> k ⇰ a
kmapAt𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → (a → a) → Map.Map k a → Map.Map k a) ((k -> (a -> a) -> Map k a -> Map k a)
-> k -> (a -> a) -> (k ⇰ a) -> k ⇰ a)
-> (k -> (a -> a) -> Map k a -> Map k a)
-> k
-> (a -> a)
-> (k ⇰ a)
-> k ⇰ a
forall a b. (a -> b) -> a -> b
$ ((a -> a) -> k -> Map k a -> Map k a)
-> k -> (a -> a) -> Map k a -> Map k a
forall a b c. (a -> b -> c) -> b -> a -> c
flip (a -> a) -> k -> Map k a -> Map k a
forall k a. Ord k => (a -> a) -> k -> Map k a -> Map k a
Map.adjust
okmap𝐷 ∷ ∀ k a b. (k → a → 𝑂 b) → k ⇰ a → k ⇰ b
okmap𝐷 :: forall k a b. (k -> a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
okmap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → 𝑂 b) → Map.Map k a → Map.Map k b) (((k -> a -> 𝑂 b) -> Map k a -> Map k b)
-> (k -> a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b)
-> ((k -> a -> 𝑂 b) -> Map k a -> Map k b)
-> (k -> a -> 𝑂 b)
-> (k ⇰ a)
-> k ⇰ b
forall a b. (a -> b) -> a -> b
$ \ k -> a -> 𝑂 b
f → (k -> a -> Maybe b) -> Map k a -> Map k b
forall k a b. (k -> a -> Maybe b) -> Map k a -> Map k b
Map.mapMaybeWithKey ((k -> a -> Maybe b) -> Map k a -> Map k b)
-> (k -> a -> Maybe b) -> Map k a -> Map k b
forall a b. (a -> b) -> a -> b
$ 𝑂 b -> Maybe b
forall a b. CHS a b => a -> b
tohs (𝑂 b -> Maybe b) -> (k -> a -> 𝑂 b) -> k -> a -> Maybe b
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> a -> 𝑂 b
f
okmapAt𝐷 ∷ ∀ k a. (Ord k) ⇒ k → (𝑂 a → 𝑂 a) → k ⇰ a → k ⇰ a
okmapAt𝐷 :: forall k a. Ord k => k -> (𝑂 a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
okmapAt𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(k → (𝑂 a → 𝑂 a) → Map.Map k a → Map.Map k a) ((k -> (𝑂 a -> 𝑂 a) -> Map k a -> Map k a)
-> k -> (𝑂 a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a)
-> (k -> (𝑂 a -> 𝑂 a) -> Map k a -> Map k a)
-> k
-> (𝑂 a -> 𝑂 a)
-> (k ⇰ a)
-> k ⇰ a
forall a b. (a -> b) -> a -> b
$ \ k
k 𝑂 a -> 𝑂 a
f → ((Maybe a -> Maybe a) -> k -> Map k a -> Map k a)
-> k -> (Maybe a -> Maybe a) -> Map k a -> Map k a
forall a b c. (a -> b -> c) -> b -> a -> c
flip (Maybe a -> Maybe a) -> k -> Map k a -> Map k a
forall k a.
Ord k =>
(Maybe a -> Maybe a) -> k -> Map k a -> Map k a
Map.alter k
k ((Maybe a -> Maybe a) -> Map k a -> Map k a)
-> (Maybe a -> Maybe a) -> Map k a -> Map k a
forall a b. (a -> b) -> a -> b
$ 𝑂 a -> Maybe a
forall a b. CHS a b => a -> b
tohs (𝑂 a -> Maybe a) -> (𝑂 a -> 𝑂 a) -> 𝑂 a -> Maybe a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝑂 a -> 𝑂 a
f (𝑂 a -> Maybe a) -> (Maybe a -> 𝑂 a) -> Maybe a -> Maybe a
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Maybe a -> 𝑂 a
forall a b. CHS a b => b -> a
frhs
bimap𝐷 ∷ ∀ k a b c. (Ord k) ⇒ (a → c) → (b → c) → (a → b → c) → k ⇰ a → k ⇰ b → k ⇰ c
bimap𝐷 :: forall k a b c.
Ord k =>
(a -> c)
-> (b -> c) -> (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
bimap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → c) → (b → c) → (a → b → c) → Map.Map k a → Map.Map k b → Map.Map k c) (((a -> c)
-> (b -> c) -> (a -> b -> c) -> Map k a -> Map k b -> Map k c)
-> (a -> c)
-> (b -> c)
-> (a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c)
-> ((a -> c)
-> (b -> c) -> (a -> b -> c) -> Map k a -> Map k b -> Map k c)
-> (a -> c)
-> (b -> c)
-> (a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall a b. (a -> b) -> a -> b
$ \ a -> c
f₁ b -> c
f₂ a -> b -> c
f₃ →
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
forall k a c b.
Ord k =>
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
Map.merge ((k -> a -> c) -> SimpleWhenMissing k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> y) -> WhenMissing f k x y
Map.mapMissing ((k -> a -> c) -> SimpleWhenMissing k a c)
-> (k -> a -> c) -> SimpleWhenMissing k a c
forall a b. (a -> b) -> a -> b
$ (a -> c) -> k -> a -> c
forall a b. a -> b -> a
const a -> c
f₁)
((k -> b -> c) -> SimpleWhenMissing k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> y) -> WhenMissing f k x y
Map.mapMissing ((k -> b -> c) -> SimpleWhenMissing k b c)
-> (k -> b -> c) -> SimpleWhenMissing k b c
forall a b. (a -> b) -> a -> b
$ (b -> c) -> k -> b -> c
forall a b. a -> b -> a
const b -> c
f₂) (SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c)
-> SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> c) -> SimpleWhenMatched k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> z) -> WhenMatched f k x y z
Map.zipWithMatched ((k -> a -> b -> c) -> SimpleWhenMatched k a b c)
-> (k -> a -> b -> c) -> SimpleWhenMatched k a b c
forall a b. (a -> b) -> a -> b
$ (a -> b -> c) -> k -> a -> b -> c
forall a b. a -> b -> a
const a -> b -> c
f₃
obimap𝐷 ∷ ∀ k a b c. (Ord k) ⇒ (a → 𝑂 c) → (b → 𝑂 c) → (a → b → 𝑂 c) → k ⇰ a → k ⇰ b → k ⇰ c
obimap𝐷 :: forall k a b c.
Ord k =>
(a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
obimap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → 𝑂 c) → (b → 𝑂 c) → (a → b → 𝑂 c) → Map.Map k a → Map.Map k b → Map.Map k c) (((a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> Map k a -> Map k b -> Map k c)
-> (a -> 𝑂 c)
-> (b -> 𝑂 c)
-> (a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c)
-> ((a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> Map k a -> Map k b -> Map k c)
-> (a -> 𝑂 c)
-> (b -> 𝑂 c)
-> (a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall a b. (a -> b) -> a -> b
$ \ a -> 𝑂 c
f₁ b -> 𝑂 c
f₂ a -> b -> 𝑂 c
f₃ →
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
forall k a c b.
Ord k =>
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
Map.merge ((k -> a -> Maybe c) -> SimpleWhenMissing k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> Maybe y) -> WhenMissing f k x y
Map.mapMaybeMissing ((k -> a -> Maybe c) -> SimpleWhenMissing k a c)
-> (k -> a -> Maybe c) -> SimpleWhenMissing k a c
forall a b. (a -> b) -> a -> b
$ (a -> Maybe c) -> k -> a -> Maybe c
forall a b. a -> b -> a
const ((a -> Maybe c) -> k -> a -> Maybe c)
-> (a -> Maybe c) -> k -> a -> Maybe c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (a -> 𝑂 c) -> a -> Maybe c
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ a -> 𝑂 c
f₁)
((k -> b -> Maybe c) -> SimpleWhenMissing k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> Maybe y) -> WhenMissing f k x y
Map.mapMaybeMissing ((k -> b -> Maybe c) -> SimpleWhenMissing k b c)
-> (k -> b -> Maybe c) -> SimpleWhenMissing k b c
forall a b. (a -> b) -> a -> b
$ (b -> Maybe c) -> k -> b -> Maybe c
forall a b. a -> b -> a
const ((b -> Maybe c) -> k -> b -> Maybe c)
-> (b -> Maybe c) -> k -> b -> Maybe c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (b -> 𝑂 c) -> b -> Maybe c
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ b -> 𝑂 c
f₂) (SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c)
-> SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> Maybe z) -> WhenMatched f k x y z
Map.zipWithMaybeMatched ((k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c)
-> (k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c
forall a b. (a -> b) -> a -> b
$ (a -> b -> Maybe c) -> k -> a -> b -> Maybe c
forall a b. a -> b -> a
const ((a -> b -> Maybe c) -> k -> a -> b -> Maybe c)
-> (a -> b -> Maybe c) -> k -> a -> b -> Maybe c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (a -> b -> 𝑂 c) -> a -> b -> Maybe c
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> b -> 𝑂 c
f₃
kbimap𝐷 ∷ ∀ k a b c. (Ord k) ⇒ (k → a → c) → (k → b → c) → (k → a → b → c) → k ⇰ a → k ⇰ b → k ⇰ c
kbimap𝐷 :: forall k a b c.
Ord k =>
(k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
kbimap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → c) → (k → b → c) → (k → a → b → c) → Map.Map k a → Map.Map k b → Map.Map k c) (((k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> Map k a
-> Map k b
-> Map k c)
-> (k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c)
-> ((k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> Map k a
-> Map k b
-> Map k c)
-> (k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall a b. (a -> b) -> a -> b
$ \ k -> a -> c
f₁ k -> b -> c
f₂ k -> a -> b -> c
f₃ →
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
forall k a c b.
Ord k =>
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
Map.merge ((k -> a -> c) -> SimpleWhenMissing k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> y) -> WhenMissing f k x y
Map.mapMissing k -> a -> c
f₁)
((k -> b -> c) -> SimpleWhenMissing k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> y) -> WhenMissing f k x y
Map.mapMissing k -> b -> c
f₂) (SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c)
-> SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> c) -> SimpleWhenMatched k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> z) -> WhenMatched f k x y z
Map.zipWithMatched k -> a -> b -> c
f₃
okbimap𝐷 ∷ ∀ k a b c. (Ord k) ⇒ (k → a → 𝑂 c) → (k → b → 𝑂 c) → (k → a → b → 𝑂 c) → k ⇰ a → k ⇰ b → (k ⇰ c)
okbimap𝐷 :: forall k a b c.
Ord k =>
(k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
okbimap𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k → a → 𝑂 c) → (k → b → 𝑂 c) → (k → a → b → 𝑂 c) → Map.Map k a → Map.Map k b → Map.Map k c) (((k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> Map k a
-> Map k b
-> Map k c)
-> (k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c)
-> ((k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> Map k a
-> Map k b
-> Map k c)
-> (k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall a b. (a -> b) -> a -> b
$ \ k -> a -> 𝑂 c
f₁ k -> b -> 𝑂 c
f₂ k -> a -> b -> 𝑂 c
f₃ →
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
forall k a c b.
Ord k =>
SimpleWhenMissing k a c
-> SimpleWhenMissing k b c
-> SimpleWhenMatched k a b c
-> Map k a
-> Map k b
-> Map k c
Map.merge ((k -> a -> Maybe c) -> SimpleWhenMissing k a c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> Maybe y) -> WhenMissing f k x y
Map.mapMaybeMissing ((k -> a -> Maybe c) -> SimpleWhenMissing k a c)
-> (k -> a -> Maybe c) -> SimpleWhenMissing k a c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (k -> a -> 𝑂 c) -> k -> a -> Maybe c
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> a -> 𝑂 c
f₁)
((k -> b -> Maybe c) -> SimpleWhenMissing k b c
forall (f :: * -> *) k x y.
Applicative f =>
(k -> x -> Maybe y) -> WhenMissing f k x y
Map.mapMaybeMissing ((k -> b -> Maybe c) -> SimpleWhenMissing k b c)
-> (k -> b -> Maybe c) -> SimpleWhenMissing k b c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (k -> b -> 𝑂 c) -> k -> b -> Maybe c
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ k -> b -> 𝑂 c
f₂) (SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c)
-> SimpleWhenMatched k a b c -> Map k a -> Map k b -> Map k c
forall a b. (a -> b) -> a -> b
$
(k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c
forall (f :: * -> *) k x y z.
Applicative f =>
(k -> x -> y -> Maybe z) -> WhenMatched f k x y z
Map.zipWithMaybeMatched ((k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c)
-> (k -> a -> b -> Maybe c) -> SimpleWhenMatched k a b c
forall a b. (a -> b) -> a -> b
$ 𝑂 c -> Maybe c
forall a b. CHS a b => a -> b
tohs (𝑂 c -> Maybe c) -> (k -> a -> b -> 𝑂 c) -> k -> a -> b -> Maybe c
forall d e a b c.
(d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
∘∘∘ k -> a -> b -> 𝑂 c
f₃
csize𝐷 ∷ ∀ k a. k ⇰ a → ℕ64
csize𝐷 :: forall k a. (k ⇰ a) -> ℕ64
csize𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → ℕ64) ((Map k a -> ℕ64) -> (k ⇰ a) -> ℕ64)
-> (Map k a -> ℕ64) -> (k ⇰ a) -> ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ64
forall a. (ToNatO64 a, STACK) => a -> ℕ64
natΩ64 (ℤ64 -> ℕ64) -> (Int -> ℤ64) -> Int -> ℕ64
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Int -> ℤ64
forall a b. CHS a b => b -> a
frhs (Int -> ℕ64) -> (Map k a -> Int) -> Map k a -> ℕ64
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> Int
forall k a. Map k a -> Int
Map.size
show𝐷 ∷ (Show k,Show a) ⇒ k ⇰ a → 𝕊
show𝐷 :: forall k a. (Show k, Show a) => (k ⇰ a) -> 𝕊
show𝐷 = 𝕊 -> 𝕊 -> 𝕊 -> ((k ∧ a) -> 𝕊) -> (k ⇰ a) -> 𝕊
forall a t. ToIter a t => 𝕊 -> 𝕊 -> 𝕊 -> (a -> 𝕊) -> t -> 𝕊
showCollection 𝕊
"{" 𝕊
"}" 𝕊
"," (((k ∧ a) -> 𝕊) -> (k ⇰ a) -> 𝕊) -> ((k ∧ a) -> 𝕊) -> (k ⇰ a) -> 𝕊
forall a b. (a -> b) -> a -> b
$ \ (k
k :* a
x) → k -> 𝕊
forall a. Show a => a -> 𝕊
show𝕊 k
k 𝕊 -> 𝕊 -> 𝕊
forall a. Append a => a -> a -> a
⧺ 𝕊
"⇒" 𝕊 -> 𝕊 -> 𝕊
forall a. Append a => a -> a -> a
⧺ a -> 𝕊
forall a. Show a => a -> 𝕊
show𝕊 a
x
iter𝐷 ∷ ∀ k a. k ⇰ a → 𝐼 (k ∧ a)
iter𝐷 :: forall k a. (k ⇰ a) -> 𝐼 (k ∧ a)
iter𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → 𝐼 (k ∧ a)) ((Map k a -> 𝐼 (k ∧ a)) -> (k ⇰ a) -> 𝐼 (k ∧ a))
-> (Map k a -> 𝐼 (k ∧ a)) -> (k ⇰ a) -> 𝐼 (k ∧ a)
forall a b. (a -> b) -> a -> b
$ ((k, a) -> k ∧ a) -> 𝐼 (k, a) -> 𝐼 (k ∧ a)
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k, a) -> k ∧ a
forall a b. CHS a b => b -> a
frhs (𝐼 (k, a) -> 𝐼 (k ∧ a))
-> ([(k, a)] -> 𝐼 (k, a)) -> [(k, a)] -> 𝐼 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ [(k, a)] -> 𝐼 (k, a)
forall a. [a] -> 𝐼 a
iterLL ([(k, a)] -> 𝐼 (k ∧ a))
-> (Map k a -> [(k, a)]) -> Map k a -> 𝐼 (k ∧ a)
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ Map k a -> [(k, a)]
forall k a. Map k a -> [(k, a)]
Map.toList
single𝐷 ∷ k ∧ a → k ⇰ a
single𝐷 :: forall k a. (k ∧ a) -> k ⇰ a
single𝐷 = (k -> a -> k ⇰ a) -> (k ∧ a) -> k ⇰ a
forall a b c. (a -> b -> c) -> (a ∧ b) -> c
curry k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
(↦♭)
lookup𝐷 ∷ ∀ k a. (Ord k) ⇒ k ⇰ a → k → 𝑂 a
lookup𝐷 :: forall k a. Ord k => (k ⇰ a) -> k -> 𝑂 a
lookup𝐷 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(Map.Map k a → k → 𝑂 a) ((Map k a -> k -> 𝑂 a) -> (k ⇰ a) -> k -> 𝑂 a)
-> (Map k a -> k -> 𝑂 a) -> (k ⇰ a) -> k -> 𝑂 a
forall a b. (a -> b) -> a -> b
$ \ Map k a
d k
k → Maybe a -> 𝑂 a
forall a b. CHS a b => b -> a
frhs (Maybe a -> 𝑂 a) -> Maybe a -> 𝑂 a
forall a b. (a -> b) -> a -> b
$ Map k a
d Map k a -> k -> Maybe a
forall k a. Ord k => Map k a -> k -> Maybe a
Map.!? k
k
null𝐷 ∷ k ⇰ a
null𝐷 :: forall k a. k ⇰ a
null𝐷 = k ⇰ a
forall k a. k ⇰ a
dø𝐷
append𝐷 ∷ (Ord k,Append a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
append𝐷 :: forall k a. (Ord k, Append a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
append𝐷 = (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 a -> a -> a
forall a. Append a => a -> a -> a
(⧺)
unit𝐷 ∷ (Ord k,Null k,Null a) ⇒ k ⇰ a
unit𝐷 :: forall k a. (Ord k, Null k, Null a) => k ⇰ a
unit𝐷 = k
forall a. Null a => a
null k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
↦♭ a
forall a. Null a => a
null
cross𝐷 ∷ (Ord k,Append k,Append a,Cross a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
cross𝐷 :: forall k a.
(Ord k, Append k, Append a, Cross a) =>
(k ⇰ a) -> (k ⇰ a) -> k ⇰ a
cross𝐷 k ⇰ a
d₁ k ⇰ a
d₂ = (k ⇰ a) -> ((k ⇰ a) -> (k ⇰ a) -> k ⇰ a) -> 𝐼 (k ⇰ a) -> k ⇰ a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
foldr k ⇰ a
forall k a. k ⇰ a
dø𝐷 ((a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 a -> a -> a
forall a. Append a => a -> a -> a
(⧺)) (𝐼 (k ⇰ a) -> k ⇰ a) -> 𝐼 (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ do
(k
k₁ :* a
x₁) ← (k ⇰ a) -> 𝐼 (k ∧ a)
forall a t. ToIter a t => t -> 𝐼 a
iter k ⇰ a
d₁
(k
k₂ :* a
x₂) ← (k ⇰ a) -> 𝐼 (k ∧ a)
forall a t. ToIter a t => t -> 𝐼 a
iter k ⇰ a
d₂
(k ⇰ a) -> 𝐼 (k ⇰ a)
forall a. a -> 𝐼 a
forall (m :: * -> *) a. Return m => a -> m a
return ((k ⇰ a) -> 𝐼 (k ⇰ a)) -> (k ⇰ a) -> 𝐼 (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ (k
k₁ k -> k -> k
forall a. Append a => a -> a -> a
⧺ k
k₂) k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
↦♭ (a
x₁ a -> a -> a
forall a. Cross a => a -> a -> a
⨳ a
x₂)
zero𝐷 ∷ k ⇰ a
zero𝐷 :: forall k a. k ⇰ a
zero𝐷 = k ⇰ a
forall k a. k ⇰ a
dø𝐷
plus𝐷 ∷ (Ord k,Plus a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
plus𝐷 :: forall k a. (Ord k, Plus a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
plus𝐷 = (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 a -> a -> a
forall a. Plus a => a -> a -> a
(+)
one𝐷 ∷ (Ord k,Zero k,Zero a) ⇒ k ⇰ a
one𝐷 :: forall k a. (Ord k, Zero k, Zero a) => k ⇰ a
one𝐷 = k
forall a. Zero a => a
zero k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
↦♭ a
forall a. Zero a => a
zero
times𝐷 ∷ (Ord k,Plus k,Plus a,Times a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
times𝐷 :: forall k a.
(Ord k, Plus k, Plus a, Times a) =>
(k ⇰ a) -> (k ⇰ a) -> k ⇰ a
times𝐷 k ⇰ a
d₁ k ⇰ a
d₂ = (k ⇰ a) -> ((k ⇰ a) -> (k ⇰ a) -> k ⇰ a) -> 𝐼 (k ⇰ a) -> k ⇰ a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
fold k ⇰ a
forall k a. k ⇰ a
dø𝐷 ((a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 a -> a -> a
forall a. Plus a => a -> a -> a
(+)) (𝐼 (k ⇰ a) -> k ⇰ a) -> 𝐼 (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ do
(k
k₁ :* a
x₁) ← (k ⇰ a) -> 𝐼 (k ∧ a)
forall a t. ToIter a t => t -> 𝐼 a
iter k ⇰ a
d₁
(k
k₂ :* a
x₂) ← (k ⇰ a) -> 𝐼 (k ∧ a)
forall a t. ToIter a t => t -> 𝐼 a
iter k ⇰ a
d₂
(k ⇰ a) -> 𝐼 (k ⇰ a)
forall a. a -> 𝐼 a
forall (m :: * -> *) a. Return m => a -> m a
return ((k ⇰ a) -> 𝐼 (k ⇰ a)) -> (k ⇰ a) -> 𝐼 (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ (k
k₁ k -> k -> k
forall a. Plus a => a -> a -> a
+ k
k₂) k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
↦♭ (a
x₁ a -> a -> a
forall a. Times a => a -> a -> a
× a
x₂)
plte𝐷 ∷ (Ord k,POrd a) ⇒ k ⇰ a → k ⇰ a → 𝔹
plte𝐷 :: forall k a. (Ord k, POrd a) => (k ⇰ a) -> (k ⇰ a) -> 𝔹
plte𝐷 = (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
forall k a. Ord k => (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
dlteBy𝐷 a -> a -> 𝔹
forall a. POrd a => a -> a -> 𝔹
(⊑)
bot𝐷 ∷ k ⇰ a
bot𝐷 :: forall k a. k ⇰ a
bot𝐷 = k ⇰ a
forall k a. k ⇰ a
dø𝐷
join𝐷 ∷ (Ord k,Join a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
join𝐷 :: forall k a. (Ord k, Join a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
join𝐷 = (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷 a -> a -> a
forall a. Join a => a -> a -> a
(⊔)
meet𝐷 ∷ (Ord k,Meet a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
meet𝐷 :: forall k a. (Ord k, Meet a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
meet𝐷 = (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a b c.
Ord k =>
(a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
dinterBy𝐷 a -> a -> a
forall a. Meet a => a -> a -> a
(⊓)
diff𝐷 ∷ (Ord k,Difference a) ⇒ k ⇰ a → k ⇰ a → k ⇰ a
diff𝐷 :: forall k a. (Ord k, Difference a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
diff𝐷 = (a -> a -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k b a.
Ord k =>
(a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a
dsdiffBy𝐷 ((a -> a -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a)
-> (a -> a -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall a b. (a -> b) -> a -> b
$ a -> 𝑂 a
forall a. a -> 𝑂 a
Some (a -> 𝑂 a) -> (a -> a -> a) -> a -> a -> 𝑂 a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ a -> a -> a
forall a. Difference a => a -> a -> a
(⊟)
all𝐷 ∷ (Ord k,All k,All a) ⇒ 𝐼 (k ⇰ a)
all𝐷 :: forall k a. (Ord k, All k, All a) => 𝐼 (k ⇰ a)
all𝐷 = 𝐼 k -> 𝐼 (k ⇰ a) -> (k -> 𝐼 (k ⇰ a) -> 𝐼 (k ⇰ a)) -> 𝐼 (k ⇰ a)
forall a t b. ToIter a t => t -> b -> (a -> b -> b) -> b
foldrOnFrom 𝐼 k
forall a. All a => 𝐼 a
all ((k ⇰ a) -> 𝐼 (k ⇰ a)
forall a. a -> 𝐼 a
forall (m :: * -> *) a. Return m => a -> m a
return k ⇰ a
forall k a. k ⇰ a
dø𝐷) ((k -> 𝐼 (k ⇰ a) -> 𝐼 (k ⇰ a)) -> 𝐼 (k ⇰ a))
-> (k -> 𝐼 (k ⇰ a) -> 𝐼 (k ⇰ a)) -> 𝐼 (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ \ k
k 𝐼 (k ⇰ a)
dsᵢ → do
k ⇰ a
d ← (a -> k ⇰ a) -> 𝐼 a -> 𝐼 (k ⇰ a)
forall a b. (a -> b) -> 𝐼 a -> 𝐼 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k
k k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
↦♭) 𝐼 a
forall a. All a => 𝐼 a
all
k ⇰ a
dᵢ ← 𝐼 (k ⇰ a)
dsᵢ
(k ⇰ a) -> 𝐼 (k ⇰ a)
forall a. a -> 𝐼 a
forall (m :: * -> *) a. Return m => a -> m a
return ((k ⇰ a) -> 𝐼 (k ⇰ a)) -> (k ⇰ a) -> 𝐼 (k ⇰ a)
forall a b. (a -> b) -> a -> b
$ k ⇰ a
d (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
⩌♭ k ⇰ a
dᵢ
dict𝐷 ∷ (Ord k,ToIter (k ⇰ a) t) ⇒ t → k ⇰ a
dict𝐷 :: forall k a t. (Ord k, ToIter (k ⇰ a) t) => t -> k ⇰ a
dict𝐷 = (k ⇰ a) -> ((k ⇰ a) -> (k ⇰ a) -> k ⇰ a) -> t -> k ⇰ a
forall a t b. ToIter a t => b -> (a -> b -> b) -> t -> b
foldr k ⇰ a
forall k a. k ⇰ a
dø𝐷 (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩌♭)
dminKey𝐷 ∷ k ⇰ a → 𝑂 k
dminKey𝐷 :: forall k a. (k ⇰ a) -> 𝑂 k
dminKey𝐷 = ((k ∧ a) -> k) -> 𝑂 (k ∧ a) -> 𝑂 k
forall a b. (a -> b) -> 𝑂 a -> 𝑂 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> k
forall a b. (a ∧ b) -> a
fst (𝑂 (k ∧ a) -> 𝑂 k) -> ((k ⇰ a) -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 k
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ (k ⇰ a) -> 𝑂 (k ∧ a)
forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dminElem𝐷
dmaxKey𝐷 ∷ k ⇰ a → 𝑂 k
dmaxKey𝐷 :: forall k a. (k ⇰ a) -> 𝑂 k
dmaxKey𝐷 = ((k ∧ a) -> k) -> 𝑂 (k ∧ a) -> 𝑂 k
forall a b. (a -> b) -> 𝑂 a -> 𝑂 b
forall (t :: * -> *) a b. Functor t => (a -> b) -> t a -> t b
map (k ∧ a) -> k
forall a b. (a ∧ b) -> a
fst (𝑂 (k ∧ a) -> 𝑂 k) -> ((k ⇰ a) -> 𝑂 (k ∧ a)) -> (k ⇰ a) -> 𝑂 k
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ (k ⇰ a) -> 𝑂 (k ∧ a)
forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dmaxElem𝐷
instance FunctorM ((⇰) k) where mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
mapM = (a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
forall (m :: * -> *) k a b.
Monad m =>
(a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
mapM𝐷
instance OFunctorM ((⇰) k) where omapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
omapM = (a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
forall (m :: * -> *) k a b.
Monad m =>
(a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
omapM𝐷
instance (Ord k) ⇒ KFunctorM k ((⇰) k) where kmapM :: forall (m :: * -> *) a b.
Monad m =>
(k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
kmapM = (k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
forall (m :: * -> *) k a b.
Monad m =>
(k -> a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
kmapM𝐷 ; kmapAtM :: forall (m :: * -> *) a.
Monad m =>
k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a)
kmapAtM = k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a)
forall (m :: * -> *) k a.
(Monad m, Ord k) =>
k -> (a -> m a) -> (k ⇰ a) -> m (k ⇰ a)
kmapAtM𝐷
instance (Ord k) ⇒ OKFunctorM k ((⇰) k) where okmapM :: forall (m :: * -> *) a b.
Monad m =>
(k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
okmapM = (k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
forall (m :: * -> *) k a b.
Monad m =>
(k -> a -> m (𝑂 b)) -> (k ⇰ a) -> m (k ⇰ b)
okmapM𝐷 ; okmapAtM :: forall (m :: * -> *) a.
Monad m =>
k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a)
okmapAtM = k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a)
forall (m :: * -> *) k a.
(Monad m, Ord k) =>
k -> (𝑂 a -> m (𝑂 a)) -> (k ⇰ a) -> m (k ⇰ a)
okmapAtM𝐷
instance (Ord k) ⇒ BiFunctorM ((⇰) k) where bimapM :: forall (m :: * -> *) a b c.
Monad m =>
(a -> m c)
-> (b -> m c) -> (a -> b -> m c) -> (k ⇰ a) -> (k ⇰ b) -> m (k ⇰ c)
bimapM = (a -> m c)
-> (b -> m c) -> (a -> b -> m c) -> (k ⇰ a) -> (k ⇰ b) -> m (k ⇰ c)
forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(a -> m c)
-> (b -> m c) -> (a -> b -> m c) -> (k ⇰ a) -> (k ⇰ b) -> m (k ⇰ c)
bimapM𝐷
instance (Ord k) ⇒ OBiFunctorM ((⇰) k) where obimapM :: forall (m :: * -> *) a b c.
Monad m =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
obimapM = (a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(a -> m (𝑂 c))
-> (b -> m (𝑂 c))
-> (a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
obimapM𝐷
instance (Ord k) ⇒ KBiFunctorM k ((⇰) k) where kbimapM :: forall (m :: * -> *) a b c.
Monad m =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
kbimapM = (k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(k -> a -> m c)
-> (k -> b -> m c)
-> (k -> a -> b -> m c)
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
kbimapM𝐷
instance (Ord k) ⇒ OKBiFunctorM k ((⇰) k) where okbimapM :: forall (m :: * -> *) a b c.
Monad m =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
okbimapM = (k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
forall (m :: * -> *) k a b c.
(Monad m, Ord k) =>
(k -> a -> m (𝑂 c))
-> (k -> b -> m (𝑂 c))
-> (k -> a -> b -> m (𝑂 c))
-> (k ⇰ a)
-> (k ⇰ b)
-> m (k ⇰ c)
okbimapM𝐷
instance Functor ((⇰) k) where map :: forall a b. (a -> b) -> (k ⇰ a) -> k ⇰ b
map = (a -> b) -> (k ⇰ a) -> k ⇰ b
forall k a b. (a -> b) -> (k ⇰ a) -> k ⇰ b
map𝐷
instance OFunctor ((⇰) k) where omap :: forall a b. (a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
omap = (a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
forall k a b. (a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
omap𝐷
instance (Ord k) ⇒ KFunctor k ((⇰) k) where kmap :: forall a b. (k -> a -> b) -> (k ⇰ a) -> k ⇰ b
kmap = (k -> a -> b) -> (k ⇰ a) -> k ⇰ b
forall k a b. (k -> a -> b) -> (k ⇰ a) -> k ⇰ b
kmap𝐷 ; kmapAt :: forall a. k -> (a -> a) -> (k ⇰ a) -> k ⇰ a
kmapAt = k -> (a -> a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => k -> (a -> a) -> (k ⇰ a) -> k ⇰ a
kmapAt𝐷
instance (Ord k) ⇒ OKFunctor k ((⇰) k) where okmap :: forall a b. (k -> a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
okmap = (k -> a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
forall k a b. (k -> a -> 𝑂 b) -> (k ⇰ a) -> k ⇰ b
okmap𝐷 ; okmapAt :: forall a. k -> (𝑂 a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
okmapAt = k -> (𝑂 a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => k -> (𝑂 a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
okmapAt𝐷
instance (Ord k) ⇒ BiFunctor ((⇰) k) where bimap :: forall a c b.
(a -> c)
-> (b -> c) -> (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
bimap = (a -> c)
-> (b -> c) -> (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
forall k a b c.
Ord k =>
(a -> c)
-> (b -> c) -> (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
bimap𝐷
instance (Ord k) ⇒ OBiFunctor ((⇰) k) where obimap :: forall a c b.
(a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
obimap = (a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
forall k a b c.
Ord k =>
(a -> 𝑂 c)
-> (b -> 𝑂 c) -> (a -> b -> 𝑂 c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
obimap𝐷
instance (Ord k) ⇒ KBiFunctor k ((⇰) k) where kbimap :: forall a c b.
(k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
kbimap = (k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall k a b c.
Ord k =>
(k -> a -> c)
-> (k -> b -> c)
-> (k -> a -> b -> c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
kbimap𝐷
instance (Ord k) ⇒ OKBiFunctor k ((⇰) k) where okbimap :: forall a c b.
(k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
okbimap = (k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
forall k a b c.
Ord k =>
(k -> a -> 𝑂 c)
-> (k -> b -> 𝑂 c)
-> (k -> a -> b -> 𝑂 c)
-> (k ⇰ a)
-> (k ⇰ b)
-> k ⇰ c
okbimap𝐷
instance CSized (k ⇰ a) where csize :: (k ⇰ a) -> ℕ64
csize = (k ⇰ a) -> ℕ64
forall k a. (k ⇰ a) -> ℕ64
csize𝐷
instance (Show k,Show a) ⇒ Show (k ⇰ a) where show :: (k ⇰ a) -> String
show = 𝕊 -> String
tohsChars (𝕊 -> String) -> ((k ⇰ a) -> 𝕊) -> (k ⇰ a) -> String
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ (k ⇰ a) -> 𝕊
forall k a. (Show k, Show a) => (k ⇰ a) -> 𝕊
show𝐷
instance ToIter (k ∧ a) (k ⇰ a) where iter :: (k ⇰ a) -> 𝐼 (k ∧ a)
iter = (k ⇰ a) -> 𝐼 (k ∧ a)
forall k a. (k ⇰ a) -> 𝐼 (k ∧ a)
iter𝐷
instance (Ord k) ⇒ Single (k ∧ a) (k ⇰ a) where single :: (k ∧ a) -> k ⇰ a
single = (k ∧ a) -> k ⇰ a
forall k a. (k ∧ a) -> k ⇰ a
single𝐷
instance (Ord k) ⇒ Lookup k a (k ⇰ a) where ⋕? :: (k ⇰ a) -> k -> 𝑂 a
(⋕?) = (k ⇰ a) -> k -> 𝑂 a
forall k a. Ord k => (k ⇰ a) -> k -> 𝑂 a
lookup𝐷
instance Null (k ⇰ a) where null :: k ⇰ a
null = k ⇰ a
forall k a. k ⇰ a
dø𝐷
instance (Ord k,Append a) ⇒ Append (k ⇰ a) where ⧺ :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⧺) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Append a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
append𝐷
instance (Ord k,Append a) ⇒ Monoid (k ⇰ a)
instance (Ord k,Null k,Null a) ⇒ Unit (k ⇰ a) where unit :: k ⇰ a
unit = k ⇰ a
forall k a. (Ord k, Null k, Null a) => k ⇰ a
unit𝐷
instance (Ord k,Append k,Append a,Cross a) ⇒ Cross (k ⇰ a) where ⨳ :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⨳) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a.
(Ord k, Append k, Append a, Cross a) =>
(k ⇰ a) -> (k ⇰ a) -> k ⇰ a
cross𝐷
instance (Ord k,Monoid k,Prodoid a) ⇒ Prodoid (k ⇰ a)
instance Zero (k ⇰ a) where zero :: k ⇰ a
zero = k ⇰ a
forall k a. k ⇰ a
zero𝐷
instance (Ord k,Plus a) ⇒ Plus (k ⇰ a) where + :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(+) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Plus a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
plus𝐷
instance (Ord k,Plus a) ⇒ Additive (k ⇰ a)
instance (Ord k,Zero k,Zero a) ⇒ One (k ⇰ a) where one :: k ⇰ a
one = k ⇰ a
forall k a. (Ord k, Zero k, Zero a) => k ⇰ a
one𝐷
instance (Ord k,Plus k,Plus a,Times a) ⇒ Times (k ⇰ a) where × :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(×) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a.
(Ord k, Plus k, Plus a, Times a) =>
(k ⇰ a) -> (k ⇰ a) -> k ⇰ a
times𝐷
instance (Ord k,Additive k,Multiplicative a) ⇒ Multiplicative (k ⇰ a)
instance (Ord k,POrd a) ⇒ POrd (k ⇰ a) where ⊑ :: (k ⇰ a) -> (k ⇰ a) -> 𝔹
(⊑) = (k ⇰ a) -> (k ⇰ a) -> 𝔹
forall k a. (Ord k, POrd a) => (k ⇰ a) -> (k ⇰ a) -> 𝔹
plte𝐷
instance Bot (k ⇰ a) where bot :: k ⇰ a
bot = k ⇰ a
forall k a. k ⇰ a
bot𝐷
instance (Ord k,Join a) ⇒ Join (k ⇰ a) where ⊔ :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⊔) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Join a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
join𝐷
instance (Ord k,Join a) ⇒ JoinLattice (k ⇰ a)
instance (Ord k,Meet a) ⇒ Meet (k ⇰ a) where ⊓ :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⊓) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Meet a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
meet𝐷
instance (Ord k,Difference a) ⇒ Difference (k ⇰ a) where ⊟ :: (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⊟) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Difference a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
diff𝐷
instance (Ord k,All k,All a) ⇒ All (k ⇰ a) where all :: 𝐼 (k ⇰ a)
all = 𝐼 (k ⇰ a)
forall k a. (Ord k, All k, All a) => 𝐼 (k ⇰ a)
all𝐷
instance (Ord k) ⇒ Dict k (𝑃 k) ((⇰) k) where
dø :: forall a. k ⇰ a
dø = k ⇰ a
forall k a. k ⇰ a
dø𝐷
↦ :: forall a. k -> a -> k ⇰ a
(↦) = k -> a -> k ⇰ a
forall k a. k -> a -> k ⇰ a
(↦♭)
dadd :: forall a. k -> a -> (k ⇰ a) -> k ⇰ a
dadd = k -> a -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => k -> a -> (k ⇰ a) -> k ⇰ a
dadd𝐷
drem :: forall a. k -> (k ⇰ a) -> k ⇰ a
drem = k -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => k -> (k ⇰ a) -> k ⇰ a
drem𝐷
dupd :: forall a. k -> (a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
dupd = k -> (a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => k -> (a -> 𝑂 a) -> (k ⇰ a) -> k ⇰ a
dupd𝐷
dlteBy :: forall a. (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
dlteBy = (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
forall k a. Ord k => (a -> a -> 𝔹) -> (k ⇰ a) -> (k ⇰ a) -> 𝔹
dlteBy𝐷
dunionBy :: forall a. (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy = (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (a -> a -> a) -> (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
dunionBy𝐷
dinterBy :: forall a b c. (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
dinterBy = (a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
forall k a b c.
Ord k =>
(a -> b -> c) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ c
dinterBy𝐷
dsdiffBy :: forall a b. (a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a
dsdiffBy = (a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a
forall k b a.
Ord k =>
(a -> b -> 𝑂 a) -> (k ⇰ a) -> (k ⇰ b) -> k ⇰ a
dsdiffBy𝐷
⋿ :: forall a. k -> (k ⇰ a) -> 𝔹
(⋿) = k -> (k ⇰ a) -> 𝔹
forall k a. Ord k => k -> (k ⇰ a) -> 𝔹
(⋿♭)
⫑ :: forall a. Eq a => (k ⇰ a) -> (k ⇰ a) -> 𝔹
(⫑) = (k ⇰ a) -> (k ⇰ a) -> 𝔹
forall k a. (Ord k, Eq a) => (k ⇰ a) -> (k ⇰ a) -> 𝔹
(⫑♭)
⩌ :: forall a. (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩌) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩌♭)
⩍ :: forall a. (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩍) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⩍♭)
⧅ :: forall a. Eq a => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⧅) = (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
forall k a. (Ord k, Eq a) => (k ⇰ a) -> (k ⇰ a) -> k ⇰ a
(⧅♭)
dminView :: forall a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dminView = (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
forall k a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dminView𝐷
dmaxView :: forall a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dmaxView = (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
forall k a. (k ⇰ a) -> 𝑂 ((k ∧ a) ∧ (k ⇰ a))
dmaxView𝐷
dkeyView :: forall a. k -> (k ⇰ a) -> 𝑂 (a ∧ (k ⇰ a))
dkeyView = k -> (k ⇰ a) -> 𝑂 (a ∧ (k ⇰ a))
forall k a. Ord k => k -> (k ⇰ a) -> 𝑂 (a ∧ (k ⇰ a))
dkeyView𝐷
dminElem :: forall a. (k ⇰ a) -> 𝑂 (k ∧ a)
dminElem = (k ⇰ a) -> 𝑂 (k ∧ a)
forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dminElem𝐷
dmaxElem :: forall a. (k ⇰ a) -> 𝑂 (k ∧ a)
dmaxElem = (k ⇰ a) -> 𝑂 (k ∧ a)
forall k a. (k ⇰ a) -> 𝑂 (k ∧ a)
dmaxElem𝐷
dkeep :: forall a. 𝑃 k -> (k ⇰ a) -> k ⇰ a
dkeep = 𝑃 k -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => 𝑃 k -> (k ⇰ a) -> k ⇰ a
dkeep𝐷
dtoss :: forall a. 𝑃 k -> (k ⇰ a) -> k ⇰ a
dtoss = 𝑃 k -> (k ⇰ a) -> k ⇰ a
forall k a. Ord k => 𝑃 k -> (k ⇰ a) -> k ⇰ a
dtoss𝐷
dict𝐼 :: forall a. 𝐼 (k ∧ a) -> k ⇰ a
dict𝐼 = 𝐼 (k ∧ a) -> k ⇰ a
forall k a. Ord k => 𝐼 (k ∧ a) -> k ⇰ a
dict𝐼𝐷
dkeys :: forall a. (k ⇰ a) -> 𝑃 k
dkeys = (k ⇰ a) -> 𝑃 k
forall k a. Ord k => (k ⇰ a) -> 𝑃 k
dkeys𝐷
dvals :: forall a. (k ⇰ a) -> 𝐼 a
dvals = (k ⇰ a) -> 𝐼 a
forall k a. (k ⇰ a) -> 𝐼 a
dvals𝐷
data family Elem ∷ ★ → ★
data family ESet ∷ ★ → ★
data family EDct ∷ ★ → ★ → ★
class
( Set (Elem p) (ESet p)
, Dict (Elem p) (ESet p) (EDct p)
) ⇒ ESD p
data StdESD (x ∷ ★)
newtype instance Elem (StdESD a) = StdESDElm { forall a. Elem (StdESD a) -> a
unStdESDElm ∷ a }
deriving (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
(Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> Eq (Elem (StdESD a))
forall a. Eq a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
forall a. (a -> a -> 𝔹) -> (a -> a -> 𝔹) -> Eq a
$c== :: forall a. Eq a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
== :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
$c/= :: forall a. Eq a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
/= :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
Eq,Eq (Elem (StdESD a))
Eq (Elem (StdESD a)) =>
(Elem (StdESD a) -> Elem (StdESD a) -> Ordering)
-> (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> (Elem (StdESD a) -> Elem (StdESD a) -> 𝔹)
-> (Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a))
-> (Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a))
-> Ord (Elem (StdESD a))
Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
Elem (StdESD a) -> Elem (StdESD a) -> Ordering
Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall a. Ord a => Eq (Elem (StdESD a))
forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> Ordering
forall a.
Ord a =>
Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
$ccompare :: forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> Ordering
compare :: Elem (StdESD a) -> Elem (StdESD a) -> Ordering
$c< :: forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
< :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
$c<= :: forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
<= :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
$c> :: forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
> :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
$c>= :: forall a. Ord a => Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
>= :: Elem (StdESD a) -> Elem (StdESD a) -> 𝔹
$cmax :: forall a.
Ord a =>
Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
max :: Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
$cmin :: forall a.
Ord a =>
Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
min :: Elem (StdESD a) -> Elem (StdESD a) -> Elem (StdESD a)
Ord)
newtype instance ESet (StdESD e) = StdESDSet { forall e. ESet (StdESD e) -> 𝑃 e
unStdESDSet ∷ 𝑃 e }
deriving
( ESet (StdESD e) -> ℕ64
(ESet (StdESD e) -> ℕ64) -> CSized (ESet (StdESD e))
forall e. ESet (StdESD e) -> ℕ64
forall a. (a -> ℕ64) -> CSized a
$ccsize :: forall e. ESet (StdESD e) -> ℕ64
csize :: ESet (StdESD e) -> ℕ64
CSized,ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
(ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> (ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> Eq (ESet (StdESD e))
forall e. Eq e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
forall a. (a -> a -> 𝔹) -> (a -> a -> 𝔹) -> Eq a
$c== :: forall e. Eq e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
== :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
$c/= :: forall e. Eq e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
/= :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
Eq,Eq (ESet (StdESD e))
Eq (ESet (StdESD e)) =>
(ESet (StdESD e) -> ESet (StdESD e) -> Ordering)
-> (ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> (ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> (ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> (ESet (StdESD e) -> ESet (StdESD e) -> 𝔹)
-> (ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> (ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> Ord (ESet (StdESD e))
ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
ESet (StdESD e) -> ESet (StdESD e) -> Ordering
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall e. Ord e => Eq (ESet (StdESD e))
forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> Ordering
forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
$ccompare :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> Ordering
compare :: ESet (StdESD e) -> ESet (StdESD e) -> Ordering
$c< :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
< :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
$c<= :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
<= :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
$c> :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
> :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
$c>= :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
>= :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
$cmax :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
max :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
$cmin :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
min :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
Ord
, ESet (StdESD e)
ESet (StdESD e) -> Null (ESet (StdESD e))
forall e. ESet (StdESD e)
forall a. a -> Null a
$cnull :: forall e. ESet (StdESD e)
null :: ESet (StdESD e)
Null,ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> Append (ESet (StdESD e))
forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
forall a. (a -> a -> a) -> Append a
$c⧺ :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
⧺ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
Append,Append (ESet (StdESD e))
Null (ESet (StdESD e))
(Null (ESet (StdESD e)), Append (ESet (StdESD e))) =>
Monoid (ESet (StdESD e))
forall e. Ord e => Append (ESet (StdESD e))
forall e. Ord e => Null (ESet (StdESD e))
forall a. (Null a, Append a) => Monoid a
Monoid
, ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
(ESet (StdESD e) -> ESet (StdESD e) -> 𝔹) -> POrd (ESet (StdESD e))
forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
forall a. (a -> a -> 𝔹) -> POrd a
$c⊑ :: forall e. Ord e => ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
⊑ :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
POrd
, ESet (StdESD e)
ESet (StdESD e) -> Bot (ESet (StdESD e))
forall e. ESet (StdESD e)
forall a. a -> Bot a
$cbot :: forall e. ESet (StdESD e)
bot :: ESet (StdESD e)
Bot,ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> Join (ESet (StdESD e))
forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
forall a. (a -> a -> a) -> Join a
$c⊔ :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
⊔ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
Join,Join (ESet (StdESD e))
Bot (ESet (StdESD e))
(Bot (ESet (StdESD e)), Join (ESet (StdESD e))) =>
JoinLattice (ESet (StdESD e))
forall e. Ord e => Join (ESet (StdESD e))
forall e. Ord e => Bot (ESet (StdESD e))
forall a. (Bot a, Join a) => JoinLattice a
JoinLattice,ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> Meet (ESet (StdESD e))
forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
forall a. (a -> a -> a) -> Meet a
$c⊓ :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
⊓ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
Meet,ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e))
-> Difference (ESet (StdESD e))
forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
forall a. (a -> a -> a) -> Difference a
$c⊟ :: forall e.
Ord e =>
ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
⊟ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
Difference
)
newtype instance EDct (StdESD k) a = StdESDDct { forall k a. EDct (StdESD k) a -> k ⇰ a
unStdESDDct ∷ k ⇰ a }
deriving
( EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
(EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> Eq (EDct (StdESD k) a)
forall a. (a -> a -> 𝔹) -> (a -> a -> 𝔹) -> Eq a
forall k a.
(Eq k, Eq a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$c== :: forall k a.
(Eq k, Eq a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
== :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$c/= :: forall k a.
(Eq k, Eq a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
/= :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
Eq,Eq (EDct (StdESD k) a)
Eq (EDct (StdESD k) a) =>
(EDct (StdESD k) a -> EDct (StdESD k) a -> Ordering)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a)
-> (EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a)
-> Ord (EDct (StdESD k) a)
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
EDct (StdESD k) a -> EDct (StdESD k) a -> Ordering
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> 𝔹)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall k a. (Ord k, Ord a) => Eq (EDct (StdESD k) a)
forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> Ordering
forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
$ccompare :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> Ordering
compare :: EDct (StdESD k) a -> EDct (StdESD k) a -> Ordering
$c< :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
< :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$c<= :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
<= :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$c> :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
> :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$c>= :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
>= :: EDct (StdESD k) a -> EDct (StdESD k) a -> 𝔹
$cmax :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
max :: EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
$cmin :: forall k a.
(Ord k, Ord a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
min :: EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
Ord
, EDct (StdESD k) a
EDct (StdESD k) a -> Null (EDct (StdESD k) a)
forall a. a -> Null a
forall k a. EDct (StdESD k) a
$cnull :: forall k a. EDct (StdESD k) a
null :: EDct (StdESD k) a
Null,EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
(EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a)
-> Append (EDct (StdESD k) a)
forall a. (a -> a -> a) -> Append a
forall k a.
(Ord k, Append a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
$c⧺ :: forall k a.
(Ord k, Append a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
⧺ :: EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
Append,Append (EDct (StdESD k) a)
Null (EDct (StdESD k) a)
(Null (EDct (StdESD k) a), Append (EDct (StdESD k) a)) =>
Monoid (EDct (StdESD k) a)
forall a. (Null a, Append a) => Monoid a
forall k a. (Ord k, Append a) => Append (EDct (StdESD k) a)
forall k a. (Ord k, Append a) => Null (EDct (StdESD k) a)
Monoid
, EDct (StdESD k) a
EDct (StdESD k) a -> Bot (EDct (StdESD k) a)
forall a. a -> Bot a
forall k a. EDct (StdESD k) a
$cbot :: forall k a. EDct (StdESD k) a
bot :: EDct (StdESD k) a
Bot,EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
(EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a)
-> Join (EDct (StdESD k) a)
forall a. (a -> a -> a) -> Join a
forall k a.
(Ord k, Join a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
$c⊔ :: forall k a.
(Ord k, Join a) =>
EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
⊔ :: EDct (StdESD k) a -> EDct (StdESD k) a -> EDct (StdESD k) a
Join,Join (EDct (StdESD k) a)
Bot (EDct (StdESD k) a)
(Bot (EDct (StdESD k) a), Join (EDct (StdESD k) a)) =>
JoinLattice (EDct (StdESD k) a)
forall a. (Bot a, Join a) => JoinLattice a
forall k a. (Ord k, Join a) => Join (EDct (StdESD k) a)
forall k a. (Ord k, Join a) => Bot (EDct (StdESD k) a)
JoinLattice
, (forall a b. (a -> b) -> EDct (StdESD k) a -> EDct (StdESD k) b)
-> Functor (EDct (StdESD k))
forall a b. (a -> b) -> EDct (StdESD k) a -> EDct (StdESD k) b
forall k a b. (a -> b) -> EDct (StdESD k) a -> EDct (StdESD k) b
forall (t :: * -> *).
(forall a b. (a -> b) -> t a -> t b) -> Functor t
$cmap :: forall k a b. (a -> b) -> EDct (StdESD k) a -> EDct (StdESD k) b
map :: forall a b. (a -> b) -> EDct (StdESD k) a -> EDct (StdESD k) b
Functor
)
instance (Ord e) ⇒ ToIter (Elem (StdESD e)) (ESet (StdESD e)) where
iter ∷ ESet (StdESD e) → 𝐼 (Elem (StdESD e))
iter :: ESet (StdESD e) -> 𝐼 (Elem (StdESD e))
iter = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝐼 e) 𝑃 e -> 𝐼 e
forall a t. ToIter a t => t -> 𝐼 a
iter
instance (Ord e) ⇒ Single (Elem (StdESD e)) (ESet (StdESD e)) where
single :: Elem (StdESD e) -> ESet (StdESD e)
single = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(e → 𝑃 e) e -> 𝑃 e
forall a t. Single a t => a -> t
single
instance (Ord e) ⇒ Set (Elem (StdESD e)) (ESet (StdESD e)) where
pø :: ESet (StdESD e)
pø = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e) 𝑃 e
forall e s. Set e s => s
pø
psingle :: Elem (StdESD e) -> ESet (StdESD e)
psingle = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(e → 𝑃 e) e -> 𝑃 e
forall a t. Single a t => a -> t
single
padd :: Elem (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
padd = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(e → 𝑃 e → 𝑃 e) e -> 𝑃 e -> 𝑃 e
forall e s. Set e s => e -> s -> s
padd
prem :: Elem (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
prem = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(e → 𝑃 e → 𝑃 e) e -> 𝑃 e -> 𝑃 e
forall e s. Set e s => e -> s -> s
prem
∈ :: Elem (StdESD e) -> ESet (StdESD e) -> 𝔹
(∈) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(e → 𝑃 e → 𝔹) e -> 𝑃 e -> 𝔹
forall e s. Set e s => e -> s -> 𝔹
(∈)
⊆ :: ESet (StdESD e) -> ESet (StdESD e) -> 𝔹
(⊆) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑃 e → 𝔹) 𝑃 e -> 𝑃 e -> 𝔹
forall e s. Set e s => s -> s -> 𝔹
(⊆)
∪ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(∪) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑃 e → 𝑃 e) 𝑃 e -> 𝑃 e -> 𝑃 e
forall e s. Set e s => s -> s -> s
(∪)
∩ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(∩) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑃 e → 𝑃 e) 𝑃 e -> 𝑃 e -> 𝑃 e
forall e s. Set e s => s -> s -> s
(∩)
∖ :: ESet (StdESD e) -> ESet (StdESD e) -> ESet (StdESD e)
(∖) = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑃 e → 𝑃 e) 𝑃 e -> 𝑃 e -> 𝑃 e
forall e s. Set e s => s -> s -> s
(∖)
pminView :: ESet (StdESD e) -> 𝑂 (Elem (StdESD e) ∧ ESet (StdESD e))
pminView = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑂 (e ∧ 𝑃 e)) 𝑃 e -> 𝑂 (e ∧ 𝑃 e)
forall e s. Set e s => s -> 𝑂 (e ∧ s)
pminView
pmaxView :: ESet (StdESD e) -> 𝑂 (Elem (StdESD e) ∧ ESet (StdESD e))
pmaxView = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑂 (e ∧ 𝑃 e)) 𝑃 e -> 𝑂 (e ∧ 𝑃 e)
forall e s. Set e s => s -> 𝑂 (e ∧ s)
pmaxView
pminElem :: ESet (StdESD e) -> 𝑂 (Elem (StdESD e))
pminElem = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑂 e) 𝑃 e -> 𝑂 e
forall e s. Set e s => s -> 𝑂 e
pminElem
pmaxElem :: ESet (StdESD e) -> 𝑂 (Elem (StdESD e))
pmaxElem = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝑂 e) 𝑃 e -> 𝑂 e
forall e s. Set e s => s -> 𝑂 e
pmaxElem
pow𝐼 :: 𝐼 (Elem (StdESD e)) -> ESet (StdESD e)
pow𝐼 = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝐼 e → 𝑃 e) 𝐼 e -> 𝑃 e
forall e s. Set e s => 𝐼 e -> s
pow𝐼
pvals :: ESet (StdESD e) -> 𝐼 (Elem (StdESD e))
pvals = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @(𝑃 e → 𝐼 e) 𝑃 e -> 𝐼 e
forall e s. Set e s => s -> 𝐼 e
pvals
instance (Ord k) ⇒ FunctorM (EDct (StdESD k)) where
mapM ∷ ∀ m a b. (Monad m) ⇒ (a → m b) → EDct (StdESD k) a → m (EDct (StdESD k) b)
mapM :: forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> EDct (StdESD k) a -> m (EDct (StdESD k) b)
mapM = W (FCoercible m)
-> (FCoercible m =>
(a -> m b) -> EDct (StdESD k) a -> m (EDct (StdESD k) b))
-> (a -> m b)
-> EDct (StdESD k) a
-> m (EDct (StdESD k) b)
forall (c :: Constraint) a. W c -> (c => a) -> a
with (forall {k1} {k2} (m :: k1 -> k2). W (FCoercible m)
forall (m :: * -> *). W (FCoercible m)
fcoercibleW_UNSAFE @m) ((FCoercible m =>
(a -> m b) -> EDct (StdESD k) a -> m (EDct (StdESD k) b))
-> (a -> m b) -> EDct (StdESD k) a -> m (EDct (StdESD k) b))
-> (FCoercible m =>
(a -> m b) -> EDct (StdESD k) a -> m (EDct (StdESD k) b))
-> (a -> m b)
-> EDct (StdESD k) a
-> m (EDct (StdESD k) b)
forall a b. (a -> b) -> a -> b
HS.$ forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((a → m b) → k ⇰ a → m (k ⇰ b)) (a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
forall (t :: * -> *) (m :: * -> *) a b.
(FunctorM t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b.
Monad m =>
(a -> m b) -> (k ⇰ a) -> m (k ⇰ b)
mapM
instance (Ord k) ⇒ Single (Elem (StdESD k) ∧ a) (EDct (StdESD k) a) where
single :: (Elem (StdESD k) ∧ a) -> EDct (StdESD k) a
single = forall a b. Coercible a b => a -> b
forall a b. Coercible a b => a -> b
coerce @((k ∧ a) → k ⇰ a) (k ∧ a) -> k ⇰ a
forall a t. Single a t => a -> t
single