muesli4 / table-layout

Layout data in grids and pretty tables. Provides a lot of tools to get the cell formatting right (positional alignment, alignment on specific characters and limiting of cell width)..
BSD 3-Clause "New" or "Revised" License
37 stars 11 forks source link

Remove dependency on data-default-instances-base, and bump base version #25

Closed Xitian9 closed 2 years ago

Xitian9 commented 2 years ago

data-default-instances-base is not on stackage, and this is a blocker for getting this project on stackage (see #12).

However, in 2016 data-default-instances-base was made a no-op which just re-exports instances from data-default-class, which we already depend on. It can therefore be safely removed.

Xitian9 commented 2 years ago

An as aside, current sentiment seems to be moving against the usage of Default in code. It might be worth reducing reliance on it in general, replacing/supplementing things like instance Default a where def = … with things like:

defA :: a
defA = …

-- Optional
instance Default a where def = defA
muesli4 commented 2 years ago

Nice.

An as aside, current sentiment seems to be moving against the usage of Default in code.

I wasn't happy with it either. The way they enable putting together options in optparse-applicative is really one of my favorites. But let us discuss that in the related thread.