Fri Oct 28 18:40:42 EDT 2011
Probably need to rethink Compile to work with Loop / Lambda. Trouble
is that this will mess up the Sys existential too.. Real trouble is
that I list oversight.
This (CompileVar ras) constraint shouldn't actually be there. Somehow
it doesn't know that this is a tuple and needs to be unpacked..
instance (CompileVar r, CompileVar rs)
=> CompileVar (r,rs) where
compileVar ns = ((t1,t2), ns'') where
(t1, ns') = compileVar ns
(t2, ns'') = compileVar ns'
What is the problem I'm trying to solve actually? I have something
which I know is a function from nested tuples of primitives to nested
tuples of primitives, monadically wrapped. And I want to generate a
bunch of variables in the right structure, apply them to the function
and get the result.
This, by itself, isn't really rocket science. The only thing that
complicates it is to map it into the typeclass relational setting
which needs a certain dependency structure.
So, essentially, Args and CompileVar CompileData are the same thing,
I've added CompileVar as a requirement to Args. Now it seems to
The trouble of course is that now I also need CompileVar (Value Tint).
instance CompileVar (Value t) where
compileVar = undefined
So I'm getting closer. Though now I run into problems with embedding.
funExpr adds a Ret, but an embedded function will already do this.
Need to distinguish between ordinary functions, and those that embed
the Loop control structure.