Closed sellout closed 7 months ago
For now, this requires adding a dependency on categorifier-ghc-bignum-integration
and the following GHC flags:
-fplugin-opt Categorifier:lookup:Categorifier.GhcBignum.Integration.symbolLookup
-fplugin-opt Categorifier:maker-map:Categorifier.GhcBignum.Integration.makerMapFun
but since this library is depended-on by base
and these operations can be encountered by using types exposed by base
, these should be part of the “core” plugin flags (conditional on GHC 9 being used).
I’m waffling on the best way to do that. Of course, my inclination is always more packages – e.g., split categorifier-plugin
into three packages like
categorifier-integration
(a library for writing integrations),categorifier-base-integration
(the existing base
support), andcategorifier-plugin
(the actual plugin).graph BT
bignum(categorifier-ghc-bignum-integration) --> integration(categorifier-integration)
base(categorifier-base-integration) --> integration
base --> bignum
plugin(categorifier-plugin) --> base
Then users should still only need to depend on categorifier-plugin
to get base
(and ghc-bignum
) support, but we can still partition everything by library. And extracting base
(by far the biggest “integration”) might help solidify the API for other integrations.
GHC 9 moved bignum (
Integer
andNatural
) implementations to a new library, which exposes new operations. Previously, instances were derived. These new operations need explicit Categorifier support.Fixes #99.