News for hackers. Stuff that matters.
Re:Railway-oriented programming by alexatkeplar on Friday June 13, 2014 @06:44AM (#7888106)
Totally agree with you re 1. The "success, but..." scenario.

We're trying to figure it out at the moment in Snowplow. We process raw events and either accumulate errors on Failure or compose an enriched event on Success. The trouble is, we would like to switch some of these errors to warnings, so we would need to push both the warnings and the enriched event through on Success.

I think we need to switch:

Validation[NonEmptyList[ProcessingMessage], EnrichedEvent]

to something like:

Validation[NonEmptyList[ProcessingMessage], Tuple2[List[ProcessingMessage], EnrichedEvent]]

It feels a bit clunky though...

There are no comments on this comment yet.