emilaxelsson / syntactic

Generic representation and manipulation of abstract syntax
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

Added Typeable instances, removed TypeUniverse and friends #12

Closed crockeea closed 10 years ago

crockeea commented 10 years ago

I added deriving Typeable clauses to Construct, AST, (:+:), Empty, and BindingT, as requested in issue #11. I removed TypeUniverse.hs, the TypeUniverse folder, and the Dynamic.hs benchmark for TypeUniverse.

(This is my first contribution to a project on github, so forgive me if I've done something horribly wrong)

emilaxelsson commented 10 years ago

Thanks for your contribution. However, I need the type universe stuff for other things, so I want to keep it in. But I can merge a patch for the Typeable deriving.

One advantage of my Typeable over the standard one can be seen here. I'm also using it for "typed compilation" in comp-edsl. It makes it possible to define polymorphic compilation rules, while the standard Typeable would only allow monomorphic rules.

crockeea commented 10 years ago

Nice! Is the TypeUniverse stuff going to move to its own project, or stay with syntactic?

emilaxelsson commented 10 years ago

I hadn't planned to move it out of Syntactic, but now that it's not used within the library it might make sense to make a separate package.

emilaxelsson commented 10 years ago

I've now split the TypeUniverse modules to a different package (02ca2dacc35745748643ed8977c024322067cf00, 6bff5147a32ffd8dc37b7a4f12992d3a8cf2bc4b).