Add module 'iofuncs'

Bug #912103 reported by Matt Giuca
6
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.

Tags: library

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r1302.

Changed in mars:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.