Backpacking tips (II)

Daniel Díaz Carrete
1 min readAug 19, 2017

--

Two more observations gleaned while playing with the Backpack module system.

During signature thinning, you can omit functions, and also abstract data types for which no typeclass is required, but it seems that you can’t omit abstract data types which demand a typeclass.

For example, Cabal will complain if you try to omit this type during thinning:

data Fooinstance Eq Foo

When using signature packages which contain more than two signatures (say, MySig and MySig.MySubSig) it seems that you must provide implementations for all of them, even if you are only interested in one. You can thin individual signatures, but you can’t let them out completely. Perhaps the solution is to put the signatures in different packages.

--

--

No responses yet