zerusski
2017-8-5 18:37:45

Got an interesting project which I think could make really good use of context + hole matching a-la redex. So, naturally curious if I could leverage or maybe just rip off what redex does. Could people familiar with redex codebase and matching algos it uses maybe give me some pointers or context so I can make sense of redex-lib/private/(matcher.rkt\|match-a-pattern.rkt). There’s no language to compile, no semantics to analyze, just structurally match parts of the tree as context and a subtree in that context. So redex proper would be a massive overkill. @robby maybe?


zerusski
2017-8-5 18:40:57

I expect the pipeline will be pretty much what redex does: match lhs of reduction rule → reduce, repeat


zerusski
2017-8-5 18:42:30

reduce: (-> tree reduction-rules tree)


zerusski
2017-8-5 18:53:12

oh, boy. I don’t think I’ll make much sense of that code, certainly not without substantial effort :joy: