2011
DOI: 10.1145/2034574.2034778
|View full text |Cite
|
Sign up to set email alerts
|

Lightweight monadic programming in ML

Abstract: Many useful programming constructions can be expressed as monads. Examples include probabilistic modeling, functional reactive programming, parsing, and information flow tracking, not to mention effectful functionality like state and I/O. In this paper, we present a type-based rewriting algorithm to make programming with arbitrary monads as easy as using ML's built-in support for state and I/O. Developers write programs using monadic values of type m τ as if they were of type τ, and our… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
2
1

Citation Types

0
15
0

Year Published

2013
2013
2020
2020

Publication Types

Select...
3
3
2

Relationship

1
7

Authors

Journals

citations
Cited by 14 publications
(15 citation statements)
references
References 24 publications
0
15
0
Order By: Relevance
“…Swamy et al [42] previously worked on automatically inserting bind and return operations into programs as necessary. This allows a programmer to mix pure and monadic computations without having to explicitly lift values or mechanically insert bind operations.…”
Section: Related Workmentioning
confidence: 99%
“…Swamy et al [42] previously worked on automatically inserting bind and return operations into programs as necessary. This allows a programmer to mix pure and monadic computations without having to explicitly lift values or mechanically insert bind operations.…”
Section: Related Workmentioning
confidence: 99%
“…The v : choice of monad M is left as a parameter in the system, except that it must be indexed by both a result type t' and a predicate transformer φ . By restricting monadic types to the co-domain of functions only, we borrow an insight from Swamy et al (2011b), who use a similar restriction to develop a type inference algorithm for monadic ML. We generalize their work to the setting of a dependently typed language.…”
Section: Monadic Fmentioning
confidence: 99%
“…For example, information-flow effect systems [29] and contextual effects [21] do not meet the requirements of Theorem 4 and so cannot be formalized using parameterized monads. Interestingly, though, should we allow EFF for E S,≤ to be just a subset of S × S rather than all pairs of states, then we can represent information-flow effect systems and contextual effects.…”
Section: Coercementioning
confidence: 99%
“…Interestingly, though, should we allow EFF for E S,≤ to be just a subset of S × S rather than all pairs of states, then we can represent information-flow effect systems and contextual effects. For example, in [29] the states are levels of secrecy, so EFF contains only those pairs s, s where s is a lower level of secrecy than s , since inputs can be propagated to outputs. Thus, Theorem 4 suggests such effect systems must be formalizable by something very similar to a parameterized monad.…”
Section: Coercementioning
confidence: 99%