core-typed

Typed Clojure, an optional type system for Clojure
2020-11-17T01:59:31.007900Z

Early days, but I've been working on a reader based on tools.reader. Still brainstorming what to use it for related to type checking, but some interplay with the analyzer could give more precise error messages https://www.patreon.com/posts/refactoring-43799339

borkdude 2020-11-17T10:32:00.009500Z

@ambrosebs I've also been doing something like this in edamame (also based on tools.reader), which is powering sci. Although it doesn't output an AST, it can include the original source string, so you can match on this in grasp: https://github.com/borkdude/grasp#matching-on-source-string It's basically read+string but also for all the inner nodes

borkdude 2020-11-17T10:32:32.010300Z

I've been considering outputting an AST, which could be useful for sci, but currently it doesn't need one really. And whitespace hasn't really been a concern.

borkdude 2020-11-17T10:34:12.011600Z

Someone commented at the sci repo that with a tools.analyzer-like AST there could be some optimizations but I currently don't see how an AST instead of sexpr adds more information to do optimizations. I'll be keeping an eye on this to learn more. Thanks!

borkdude 2020-11-17T10:34:53.012100Z

Currently you can output as AST-like thing with edamame using the :postprocess hook which allows you to wrap the node (and source string and location) into a container to preserve more info (like saving locations for keywords)

borkdude 2020-11-17T10:37:37.012600Z

Another interesting rewrite-clj alternative is https://github.com/carocad/parcera which is based on ANTLR