Skip to content

Make Eval a wrapper around IO #9

Description

@treeowl

As far as I can tell, the Eval type is, for recent GHC versions, a complete re-implementation of the basic IO interface, but by another name. It therefore strikes me that this would be a good place to use a newtype wrapper instead. Then only the really parallel-specific functions would need to dig into the detailed representation. Sequencing evaluation relative to I/O, as another ticket suggests, would also be easy:

evaluatePar = coerce evaluate

Revealing the wrapping through an internals module would allow others to use the detailed representation as well, without needing unsafeCoerce but also without guaranteed API stability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions