Effect Polymorphism in Higher-Order Logic (Proof Pearl)
The notion of a monad cannot be expressed within higher-order logic (HOL) due to type system restrictions. I show that if a monad is restricted to values of a fixed type, this notion can be formalised in HOL. Based on this idea, I develop a library of effect specifications and implementations of mon...
Saved in:
Published in | Journal of automated reasoning Vol. 63; no. 2; pp. 439 - 462 |
---|---|
Main Author | |
Format | Journal Article |
Language | English |
Published |
Dordrecht
Springer Netherlands
01.08.2019
Springer Nature B.V |
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | The notion of a
monad
cannot be expressed within higher-order logic (HOL) due to type system restrictions. I show that if a monad is restricted to values of a fixed type, this notion
can
be formalised in HOL. Based on this idea, I develop a library of effect specifications and implementations of monads and monad transformers. Hence, I can abstract over the concrete monad in HOL definitions and thus use the same definition for different (combinations of) effects. I illustrate the usefulness of effect polymorphism with a monadic interpreter. |
---|---|
ISSN: | 0168-7433 1573-0670 |
DOI: | 10.1007/s10817-018-9476-2 |