-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
As of now, the internal (what's stored inside ArithmeticCircuit
) and external (what's used in MonadCircuit
interface) representations coincide: there's a unique LookupTable
type. However, it is a bit clunky:
- on user side, having to first call
registerFunction
is non-intuitive; - on implementation side, having this GADT-inside-existential is much harder to work with than its possible simply typed counterpart with erased functor parameter.
So I propose to split this in two types:
-- | Type for MonadCircuit API
data LookupTable a f where
... same as before ...
Plot :: (forall w. IsWitness a w => f w -> g w) -> LookupTable a f -> LookupTable a (f :*: g)
-- ^ note the use of function instead of its ID
-- | Type for internal use
newtype FunctionId = FunctionId ByteString
data LookupType a -- note the absence of functor parameter
= LTRanges (Set (a, a))
| LTProduct (LookupType a) (LookupType a)
| LTPlot FunctionId (LookupType a)
vlasin
Metadata
Metadata
Assignees
Labels
No labels