core-typed 2025-06-17

On the malli integration @ambrosebs - do you have a sort of rule of thumb of what works well and what won't? Like if I start using custom function predicates like [:fn ...] - should I expect that to fail through the TC integration?

Understood! Thank you for sharing, this is really helpful for getting a feel for what state it's in.

I ask because it feels too good to be true that it'd just work perfectly in all Malli use cases.

I ask partially because I really like the malli.experimental/defn syntax. And I'm wondering how much I can mix and match the two ideas 🤔 and where the boundaries are between their "support matrix".

Maybe I should use TC APIs wherever I can and only rely on the malli integration for some level of "fingers crossed!" backwards compatibility with projects that are already all in on malli. I also like the idea of my type checker code being able to run statically or at runtime, that is fun.

Wanting that property would push me to only writing in malli, I just worry about the limitations.

ref schemas will work automatically because we can just call m/deref.

I'd love to offload all types to malli. I had a cool idea at some point to embed malli schemas in TC types like (All [x] [(Malli :foo) :-> (Malli :bar)])

:fn just translates to t/Any now, but we could improve it automatically by type checking the predicate and using the inferred then/else propositions and the type. [:fn integer?] => (cf integer?) => (Pred Int) => Int

if you want to blaze a trail on malli I will be right behind you to add support as needed.