Sculthorpe, N ORCID: https://orcid.org/0000-0002-7244-0916, Bracker, J, Giorgidze, G and Gill, A, 2013. The constrained-monad problem. ACM SIGPLAN Notices, 48 (9), pp. 287-298. ISSN 0362-1340
Preview |
Text
PubSub5461_Sculthorpe.pdf - Post-print Download (247kB) | Preview |
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 onthat 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 can also be applied to other structures, such as applicative functors. One significant use case for this technique is domain-specific languages,where it is often desirable to compile a deep embedding of a computation to some other language, which requires restricting the types that can appear in that computation.
Item Type: | Journal article |
---|---|
Publication Title: | ACM SIGPLAN Notices |
Creators: | Sculthorpe, N., Bracker, J., Giorgidze, G. and Gill, A. |
Publisher: | Association for Computing Machinery (ACM) |
Date: | September 2013 |
Volume: | 48 |
Number: | 9 |
ISSN: | 0362-1340 |
Identifiers: | Number Type 10.1145/2544174.2500602 DOI |
Divisions: | Schools > School of Science and Technology |
Record created by: | Linda Sullivan |
Date Added: | 27 May 2016 15:40 |
Last Modified: | 13 Oct 2017 13:26 |
URI: | https://irep.ntu.ac.uk/id/eprint/27906 |
Actions (login required)
Edit View |
Statistics
Views
Views per month over past year
Downloads
Downloads per month over past year