Zulip Chat Archive
Stream: new members
Topic: Freer Monad in Lean
Simon Daniel (Mar 12 2024 at 12:19):
im Trying to implement a Freer Monad that describes a Sequence of Effects.
One Effect E however should be allowed to contain such a Effect sequence itself (e.g. to branch between two continuations)
inductive Freer (Eff:Type u → Type v) (α:Type w) where
| Do: Eff β → (β → Freer Eff α) → Freer Eff α
| Return: α → Freer Eff α
inductive E (α:Type) where
| e: (Bool -> Freer E α) -> E α -- branches the Effect Sequence
ive seen this in a Haskell code example and wondered if this works in Lean aswell
Notification Bot (Mar 12 2024 at 13:13):
A message was moved here from #new members > universe levels by Simon Daniel.
Last updated: May 02 2025 at 03:31 UTC