core-typed

Ben Sless 2026-03-10T15:19:15.481369Z

@nbtheduke I think the best place to expand on your question is here Let's restate, can https://github.com/replikativ/beichte be used for type inference? I think the short answer is no because it's clearly one directional and there's a limit how much you can do with that

👍 1
2026-03-10T15:23:57.926719Z

good call with the channel, i forgot about it

2026-03-10T15:25:09.422899Z

clearly there's a ton of static analysis one can do on clojure code (clj-kondo, now this), but i frankly don't know enough about how type systems work (type inference especially) to know what's actually possible

Ben Sless 2026-03-10T15:25:20.762059Z

Beichte is beautifully simple and is essentially a tools analyzer bottom up pass Full type inference will be a whole ass project

2026-03-10T15:26:00.210589Z

lol right. i don't mean to suggest that beichte expand to cover that, more that the approach it takes might be an avenue for such analysis

Ben Sless 2026-03-10T15:33:11.940889Z

I'll give you some spoilers the approach taken by core typed is similar, where expressions have bottom and top types and they unify like you would expect, min the tops, max the bottoms

👍 1
Ben Sless 2026-03-10T15:33:21.711059Z

Fancy name is "lattice"

Ben Sless 2026-03-10T15:36:42.778339Z

CC @whilo you could probably provide a more informed opinion 😁

Ben Sless 2026-03-10T15:39:43.621979Z

The problem is this information flows in both directions so it is somewhat hard

Ben Sless 2026-03-10T15:40:15.331249Z

And I also found a while back tools analyzer is slow 😊

➕ 1
whilo 2026-03-24T21:54:40.774439Z

sorry, for replying late, only saw this lately; beichte is one form of abstract interpretation, typedclojure already has a symbolic interpreter as well, i think it is reasonable to maybe share some infrastructure, but in general implement different interpreters for different types of analysis. i looked more into what can be done and beichte could provide capture sets for variables (more fine grained), in particular read/write sets, which allow separation logic like reasoning about concurrent code; scala3 does this for instance

👍 1