Opened 7 years ago

Closed 6 years ago

Last modified 4 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: Difficulty: Easy (less than 1 hour)
Test Case: Blocked By:
Blocking: Related Tickets:

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 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by mux

comment:1 Changed 7 years ago by mux

  • Type changed from bug to proposal

comment:2 Changed 7 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 7 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 6 years ago by igloo

  • Resolution set to fixed
  • Status changed from new to closed

This proposal seems to be abandoned

comment:5 Changed 6 years ago by igloo

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 Changed 6 years ago by igloo

  • Resolution set to wontfix
  • Status changed from reopened to closed

comment:7 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:8 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:9 Changed 4 years ago by simonmar

  • Difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.