Opened 10 years ago

Closed 9 years ago

Last modified 7 years ago

#1274 closed proposal (wontfix)

Add a MonadState instance for the Parsec monad

Reported by: mux Owned by:
Priority: normal Milestone: Not GHC
Component: libraries (other) Version: 6.6
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

This patch adds a MonadState instance for the GenParser monad of Parsec, allowing the use of the usual state handling primitives instead of the custom ones provided by Parsec.

The drawback of this is that it adds a dependency on mtl; I don't think that's much of a problem though, and we'll need it for ParsecT anyways.

Attachments (1)

monadstate.diff (1.4 KB) - added by mux 10 years ago.

Download all attachments as: .zip

Change History (10)

Changed 10 years ago by mux

Attachment: monadstate.diff added

comment:1 Changed 10 years ago by mux

Type: bugproposal

comment:2 Changed 10 years ago by dfranke

Actually there's a significant drawback to depending on MTL: it depends on multi-parameter typeclasses, whereas Parsec is currently portable.

I vote for accepting the patch anyway, though. Until such time as a Haskell compiler other than GHC becomes suitable for developing production code, I'll have trouble accepting h98-compliance as a justification for omitting what is otherwise a worthwhile feature.

comment:3 Changed 10 years ago by Christian.Maeder@…

Can't that instance be put in a different module for those who want it? It would be an orphaned instance, though, and I don't know how common orphan instances are in the library.

comment:4 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed

This proposal seems to be abandoned

comment:5 Changed 9 years ago by igloo

Resolution: fixed
Status: closedreopened

comment:6 Changed 9 years ago by igloo

Resolution: wontfix
Status: reopenedclosed

comment:7 Changed 8 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:8 Changed 8 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:9 Changed 7 years ago by simonmar

difficulty: Easy (1 hr)Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.