Skip to main content
Process journal of learning by Attila Vajda

I'm exploring Liquid Haskell a bit further because it seems fun

monad is a monoid in the category of endofunctors? #

a monad = monoid in End(C) πŸ–‡ ?

Obj: endofunctors F : C β†’ C Arr: natural transformations Ξ· : Id β†’ F, ΞΌ : FΒ² β†’ F

liquidPlugin’s MonadIO m context plays F, with return/pure = Ξ·, >>= = ΞΌ. 🎹🐚

πŸ™, in liquidPlugin :: MonadIO m => [CmdOpt] β†’ a β†’ (Config β†’ m a) β†’ m a:

#maybe

[CmdOpt] β†’ ModSummary β†’ ParsedResult β†’ Hsc ParsedResult β‰ˆ fold + action pattern.

(opts, ms, pr) ∈ Opts Γ— Meta Γ— AST 🎹

f : O Γ— M Γ— A β†’ Hsc A β‰ˆ combine context β†’ transform state πŸ–‡