This is one of the problem Syntactic aims to solve, but it requires you
to use a different representation of expressions (for good or bad). If
you want to keep your existing representation, then you have to use a
generic programming library that supports GADTs. I know at least the
Spine
On Wed, Nov 21, 2012 at 2:56 PM, Emil Axelsson wrote:
This is one of the problem Syntactic aims to solve, but it requires you to
use a different representation of expressions (for good or bad). If you
want to keep your existing representation, then you have to use a generic
programming
Thanks everyone for your replies.
I am not wedded to GADTs or really anything else. I am going to give the
syntactic library a shot over the next few days and see if I can hack
something together.
Thanks again for the papers and libraries.
Steve
On Wed, Nov 21, 2012 at 6:10 AM, Sean Leather
Hi Everyone,
I am trying to build a function to rewrite and AST. I have and AST which is
designed to represent a computation graph. I will present a simplified
version here designed to illustrate the problem. I have tried numerous ways
of rewriting it including uniplate, recursion and Edward
Have you read Data types a la carte? The 'syntactic' package implements
the ideas, but it was a little dense for my purposes when I looked (I just
wanted data types, a la carte; it focuses on manipulating ASTs defined a la
carte). It might be what you need, or you can roll your own based on the
On 11/20/12 6:21 PM, Steve Severance wrote:
class (ReflectDescriptor a, Typeable a, Wire a) = ProtoBuf a
data Expression a b where
OpenTable :: (ProtoBuf b) = Int - Table - Expression () b
OpenFile :: (ProtoBuf b) = Int - String - Expression () b
WriteFile :: (Typeable a, ProtoBuf b) =