Announcing Saturn, a Haskell library for handling cron schedules

11 Likes

Wow I wasn’t aware of the more-than-one-public-library. Good to know.

Interesting about the multib usage. But the hackage only renders one?

Also, last time I tried multilib, HLS didn’t like (cabal repl instead). I was disappointed, and I had to revert to multiple cabal files…

1 Like

HLS should work fine with multiple libraries in a package. You might need to set an empty cabal cradle in your hie.yaml.

2 Likes

Pardon me blaming the wrong thing. I just tried with this project again, it is actually the cabal not supporting it:

$ cabal repl
Error: cabal: Cannot open a repl for multiple components at once. The target
'' refers to the package saturn-1.0.0.2 which includes the libraries unstable,
spec and saturn.

The reason for this limitation is that current versions of ghci do not support
loading multiple components as source. Load just one component and when you
make changes to a dependent component then quit and reload.

Edit:

Or more precisely, it is the emacshaskell-mode that couldn’t infer the right component name to load using cabal repl, when I was using C-c C-l. Instead, these could work:

$ cabal repl saturn # main component
$ cabal repl saturn:spec # spec sub-component
$ cabal repl saturn:unstable # unstable sub-component
1 Like

I wonder what would be the best design for rendering them. This particular package has a main library with a single module, and secondary library with a lot of unstable modules. Listing all the modules in the landing page would be distracting to me, given that I would seldom reach for the internals.

I do like the idea of exposing the internals in a secondary library though.

1 Like

Yes, Hackage does not fully support multiple exposed libraries yet.