module UVMHS.Core.Classes.DSL where

import UVMHS.Core.Init
import UVMHS.Core.Classes.Collections

infixr 0 ⊙$
infixr 1 
infixl 7 
infixl 7 ⊙⋆


class Arrow a where (⇨)  a  a  a
class Apply a where (⊙)  a  a  a
class Tup a where tup  (ToIter a t)  t  a

(⊙$)  (Apply e)  e  e  e
⊙$ :: forall e. Apply e => e -> e -> e
(⊙$) = e -> e -> e
forall e. Apply e => e -> e -> e
(⊙)

(⊙⋆)  (Apply e,ToIter e t)  e  t  e
⊙⋆ :: forall e t. (Apply e, ToIter e t) => e -> t -> e
(⊙⋆) e
x = e -> (e -> e -> e) -> 𝐼 e -> e
forall b a. b -> (a -> b -> b) -> 𝐼 a -> b
fold𝐼 e
x ((e -> e -> e) -> e -> e -> e
forall a b c. (a -> b -> c) -> b -> a -> c
flip e -> e -> e
forall e. Apply e => e -> e -> e
(⊙)) (𝐼 e -> e) -> (t -> 𝐼 e) -> t -> e
forall b c a. (b -> c) -> (a -> b) -> a -> c
 t -> 𝐼 e
forall a t. ToIter a t => t -> 𝐼 a
iter