@leobm The key point for me was understanding what "type A is inhabited by values x, y, z" is about.
Next, if types are some propositions in logic, then values are their proofs.
So, by writing code that compiles you're proving that some logical statement holds.
Interestingly, if you can't say something with types, no way you can write actual code that gonna work.
And of course, if a type system admits bullshit, then you can bullshit compiler with your code.
Every industrial language admits BS, but some of them make it easy to lie, cheat, AND steal (esp. with dynamic types), while the others make that painful.
A good type system can review your design before you have committed to implementing something unrealistic, being a net positive on effort spent pinning down all the important stuff.