Equations
- «term_<&>_» = Lean.ParserDescr.trailingNode `«term_<&>_» 100 101 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " <&> ") (Lean.ParserDescr.cat `term 100))
@[inline]
Equations
- failure : {α : Type u} → f α
- orElse : {α : Type u} → f α → (Unit → f α) → f α
Instances
- StateRefT'.instAlternativeStateRefT'
- StateT.instAlternativeStateT
- ReaderT.instAlternativeReaderT
- Lean.PrettyPrinter.Delaborator.instAlternativeDelabM
- Lean.Elab.Tactic.instAlternativeTacticM
- Lean.Meta.instAlternativeMetaM
- OptionT.instAlternativeOptionT
- Lean.MonadCacheT.instAlternativeMonadCacheT
- Lean.Parsec.instAlternativeParsec
Equations
- instOrElse f α = { orElse := Alternative.orElse }
@[inline]
Equations
- optional x = HOrElse.hOrElse (some <$> x) fun x => pure none
- toBool : α → Bool
Instances
Equations
- «term_<||>_» = Lean.ParserDescr.trailingNode `«term_<||>_» 30 31 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " <||> ") (Lean.ParserDescr.cat `term 30))
Equations
- «term_<&&>_» = Lean.ParserDescr.trailingNode `«term_<&&>_» 35 36 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " <&&> ") (Lean.ParserDescr.cat `term 35))
- stM : Type u → Type u
- liftWith : {α : Type u} → (({β : Type u} → n β → m (stM β)) → m α) → n α
- restoreM : {α : Type u} → m (stM α) → n α
- stM : Type u → Type u
- liftWith : {α : Type u} → (({β : Type u} → n β → m (stM β)) → m α) → n α
- restoreM : {α : Type u} → stM α → n α
Instances
instance
instMonadControlT
(m : Type u_1 → Type u_2)
(n : Type u_1 → Type u_3)
(o : Type u_1 → Type u_4)
[inst : MonadControl n o]
[inst : MonadControlT m n]
:
MonadControlT m o
Equations
- instMonadControlT m n o = { stM := fun α => stM m n (MonadControl.stM n o α), liftWith := fun {α} f => MonadControl.liftWith fun x₂ => liftWith fun x₁ => f fun {β} => x₁ (MonadControl.stM n o β) ∘ x₂ β, restoreM := fun {α} => MonadControl.restoreM ∘ restoreM }
Equations
- instMonadControlT_1 m = { stM := fun α => α, liftWith := fun {α} f => f fun {β} x => x, restoreM := fun {α} x => pure x }