Skip to content

Idempotence bug involving moving comments #340

@mrkkrp

Description

@mrkkrp

From formatting parsec3:

Original input:

mergeErrorReply :: ParseError -> Reply s u a -> Reply s u a
mergeErrorReply err1 reply -- XXX where to put it?
    = case reply of
        Ok x state err2 -> Ok x state (mergeError err1 err2)
        Error err2      -> Error (mergeError err1 err2)

1 pass:

mergeErrorReply :: ParseError -> Reply s u a -> Reply s u a
mergeErrorReply err1 reply = -- XXX where to put it?
  case reply of
    Ok x state err2 -> Ok x state (mergeError err1 err2)
    Error err2 -> Error (mergeError err1 err2)

2 pass (fixpoint):

mergeErrorReply :: ParseError -> Reply s u a -> Reply s u a
mergeErrorReply err1 reply =
  -- XXX where to put it?
  case reply of
    Ok x state err2 -> Ok x state (mergeError err1 err2)
    Error err2 -> Error (mergeError err1 err2)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcommentsIssues related to comment placementidempotenceIdempotence issues and solutions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions