Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming 2013
DOI: 10.1145/2500365.2500602
|View full text |Cite
|
Sign up to set email alerts
|

The constrained-monad problem

Abstract: In Haskell, there are many data types that would form monads were it not for the presence of type-class constraints on the operations on that data type. This is a frustrating problem in practice, because there is a considerable amount of support and infrastructure for monads that these data types cannot use. Using several examples, we show that a monadic computation can be restructured into a normal form such that the standard monad class can be used. The technique is not specific to monads, and we show how it… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
12
0

Year Published

2013
2013
2017
2017

Publication Types

Select...
4
4

Relationship

3
5

Authors

Journals

citations
Cited by 22 publications
(12 citation statements)
references
References 33 publications
(34 reference statements)
0
12
0
Order By: Relevance
“…Constrained monads [37] thus do not fit into the present polymonad framework. We suspect that the introduction of constrained polymonads is possible by using techniques similar to those used when introducing constrained monads.…”
Section: Future Workmentioning
confidence: 88%
See 1 more Smart Citation
“…Constrained monads [37] thus do not fit into the present polymonad framework. We suspect that the introduction of constrained polymonads is possible by using techniques similar to those used when introducing constrained monads.…”
Section: Future Workmentioning
confidence: 88%
“…Over the last few years, generalizations such as constrained [37] and parameterized monads [3] have been investigated, in a quest for more flexibility and enhanced static checks partly enabled by improved support for type-level programming [20,47]. Parameterized monads have proven to be especially popular: they have been used to model session-types [34], effect systems [30,23], information flow control [9] and composable continuations [46].…”
Section: Introductionmentioning
confidence: 99%
“…In some cases, a deep embedding together with normalization can provide an alternative way to work with constrained monads without going beyond the standard monad class [40].…”
Section: Monadic Notionsmentioning
confidence: 99%
“…However, this is not the case. The vectors [40,47] briefly mentioned in Section 2 require an equality constraint on the Return instance and they also require a constraint on a in the Bind instance. Another example where constraints in any of these locations are necessary would be embedded domain specific languages [8,36].…”
Section: Representation In Haskellmentioning
confidence: 99%
“…There are also tagless-final DSLs [6], where there is no early commitment to a specific embedding, but instead class overloading in used to specify the API. Several Haskell DSLs, including Feldspar [37] and Obsidian [8], reify the structure of monadic code [40,41] to generate external imperative code. Other DSLs, including CoPilot [38] and Ivory [24], use a shallow embedding of statements to capture the monadic structure.…”
Section: Other Related Workmentioning
confidence: 99%