[<<][meta_siso][>>][..]
Wed Aug 19 11:11:08 EDT 2015

Curried primitives

Having trouble defining recursion relation for compiling curried
functions.  This is due to need for makeVar which is (m (r t)), so
need to assume monad.

instance (MakeVar i, Flatten i, Flatten o) => Compile (i -> Comp o) where
  compile f = compile $ makeVar >>= codeFun >>= f


Maybe this can be solved with a join trick?

instance (MakeVar i, Flatten i, Flatten o) => Compile (Comp i -> Comp o) where



It could work with overlapping instances.
EDIT: still nothing.  Could do lifted functions easily.  Maybe that's the way to go?



[Reply][About]
[<<][meta_siso][>>][..]