Adding Fixed Point Data Types to base

Ruben Astudillo ruben.astud at
Sun Oct 16 18:49:07 UTC 2016

On 16/10/16 11:21, Andrew Martin wrote:
> The advantage this offers is that Free and Cofree would be able to
> enjoy a greater number of typeclass instances provided libraries
> across the ecosystem. As it stands, adding the somewhat heavy `free`
> dependency is not a good choice for libraries like `aeson`,
> `mustache`, and `hashable`. In the case of Fix, the ecosystem
> currently lacks a canonical library that provides it
> (recursion-schemes and data-fix both offer the same definition though,
> and various tutorials all define it the same way). It could benefit
> from the new instances as well.

This is a problem I see a lot, having to pull a "heavy" dependency to
implement an instance and avoid orphans. I don't favor making a monolith
in `base` for this, it goes against modularity and is a maintainer risk
for base. Can cabal flags + CPP be abused to implement the instances on
demand if the constrains are meet?. That would solve this problem at the
cost of having to remember package-flags.

-- Ruben Astudillo

More information about the Libraries mailing list