Add module 'iofuncs'
Bug #912103 reported by
Matt Giuca
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mars |
Fix Committed
|
Low
|
Matt Giuca |
Bug Description
Due to the simplistic I/O annotation system in Mars, it is not possible to generalise higher-order functions to work on both pure and I/O function values. This is limiting: for example, the higher-order function map only operates on pure functions. Indeed, it would not be valid for map to operate on I/O functions, because map itself is not permitted to perform side-effects. However, this makes it impossible to easily apply an I/O action to each element of a list from within an I/O context.
Add a module 'iofuncs' that provides an equivalent of every higher-order function in the prelude, but the versions there accept and return I/O-annotated functions.
Related branches
To post a comment you must log in.
Fixed in trunk r1302.