External Publication
Visit Post

[RFC] Sibyl: Time Series Analysis in Haskell

Haskell Community [Unofficial] March 18, 2026
Source

My initial intuition has two recommendations.

Firstly, you could predominantly use the “safe” functions in the package, and then expose a convenience module which use TH or similar to just generate either (error …) id . f variants. This would let people use the safe stuff if they wanted, but those who want a grab bag of useful functions can use them and accept the risks.

Secondly, I see you use a |> piping operator. I wonder whether you could do some kind of effects-system like thing where you can plumb together all your combinators in the scripter fashion, but the way you interpret it is how you get the key difference. For scripters, working in IO is likely ok, so all errors can be chucked into fail or similar immediately, but for those who want stronger guarantees you can let the monad go to Either err or some other custom stack.

This second approach may have the annoying effect of making pure functions you wish to compose have to exist within a Monad, but with sufficiently general constraints (Applicative or Monad) you could simplify to Identity in some cases; maybe these pure functions have their monadic counterparts suffixed with M?

Discussion in the ATmosphere

Loading comments...