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. We show that if a monad is used with values of only one type, this notion can be formalised in HOL. Based on this idea, we develop a library of effect specifications and implementations of mona...
Saved in:
Published in | Interactive Theorem Proving pp. 389 - 409 |
---|---|
Main Author | |
Format | Book Chapter |
Language | English |
Published |
Cham
Springer International Publishing
|
Series | Lecture Notes in Computer Science |
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. We show that if a monad is used with values of only one type, this notion can be formalised in HOL. Based on this idea, we develop a library of effect specifications and implementations of monads and monad transformers. Hence, we can abstract over the concrete monad in HOL definitions and thus use the same definition for different (combinations of) effects. We illustrate the usefulness of effect polymorphism with a monadic interpreter. |
---|---|
ISBN: | 9783319661063 331966106X |
ISSN: | 0302-9743 1611-3349 |
DOI: | 10.1007/978-3-319-66107-0_25 |