External Publication
Visit Post

[RFC] Sibyl: Time Series Analysis in Haskell

Haskell Community [Unofficial] March 19, 2026
Source

It’s very exciting to see DataHaskell stuff moving again. Scattershot feedback, in no particular order, though I hope it’s useful:

github.com/jackiedorland/sibyl

src/Sibyl.hs

f545ed364

    19. type TS t y = TimeSeries t y


    20. type FC t = Forecast t

I recommend dropping the parameters, as GHC can only expand a type alias when all parameters are provided:

type TS = TimeSeries
type FC = Forecast

I can’t find where you define (|>), but I’d recommend using (&) from Data.Function:

  • It’s in package base, so you don’t pull in another dependency
  • It’s the standard Haskell operator for this concept
  • It reads well (verbally): "fromDataFrame … and fit … and forecast … and toDataFrame`
  • The < and > on operators have an established meaning in Haskell, they usually imply something is “lifted”: (<$>), (<$), ($>), (<*>), (<*), (*>), (<&>), (<$?>), (<&?>) etc.

You may want to think about documenting your type parameters, because m in a constraint often means “some monad” and t often means “some traversable”. Choosing short abbreviations and using them consistently (e.g. mdl or model for “model”?) might help here.

I personally don’t think -XDataKinds is that scary, particularly if you can put in the work to do helpful custom type errors, and -XRequiredTypeArguments means you can ask for type variables that you need, and don’t have to rely on users’ intuition that an inference failure requires an application. But I’m not on the data wrangler and might not be your target audience. I do note that if your type checking is fast enough, changing something and getting a type error is a better experience than changing something, trying to run your code, and having it fall over with a runtime type error. Whether you can get Python- or R-using data people across the initial hump of “the types are there to help you” is a question best answered by testing on real users.

Discussion in the ATmosphere

Loading comments...