emilaxelsson / syntactic

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

Merge Full/:-> into a single type #31

Open oliver-batchelor opened 7 years ago

oliver-batchelor commented 7 years ago

For your interest, this seems to compile with minimal changes. I've left alone classes like Syntactic for the most part, and simply restricted the kind where necessary to Sig Type -> Type, for example in the eval class, where the AST data type itself is still kind polymorphic.

The only casualty is Functor (AST sym) which I guess is now some other type of functor potentially? Any ideas there?

oliver-batchelor commented 7 years ago

Still doesn't compile on 7.10 because base 4.9 now has polykinded Const :: Type -> k -> Type where 4.7 is Const :: Type -> Type -> Type

emilaxelsson commented 7 years ago

Thank you for this PR! I want to see how this plays out in raw-feldspar. This will take some time, but I'll try to be quick.

I think we should define our own poly-kinded Const then. I wouldn't want to drop 7.10 support.

I guess 7.8 is out of question? (Can never remember which features were introduced when.)

oliver-batchelor commented 7 years ago

Seems 7.8 is failing for a different reason (something about Typeable 'Full), I'll see if it can be fixed up.

emilaxelsson commented 7 years ago

Wow, this too way longer than expected... For some reason I was expecting to have to make changes in RAW-Feldspar, but all I needed was to turn on DataKinds and PolyKinds and everything works fine. Sorry it took so long.

I'll be happy to merge. Could you perhaps just smash the commits into a single one with a more descriptive message?

Thanks

emilaxelsson commented 7 years ago

Oh right, there was also the 7.8 issue. Any progress on that?