News for hackers. Stuff that matters.
Re:What is type safety? by judk on Tuesday August 05, 2014 @11:52PM (#8140914)
https://hackage.haskell.org/package/type-level-numbers-0.1.1...

But it's not clear to me what happens when you try to compile and typecheck program that attempts to subtract numbers provided as input at runtime.

Re:What is type safety? by tel on Wednesday August 06, 2014 @01:52AM (#8141204)
That link only goes part way.

What you'd need to do is something like

    createProof : (n : Nat) -> (m : Nat) -> Maybe (n >= m)
which could either succeed or fail to produce the needed proof at runtime. Without the proof it'd be impossible to perform the subtraction, so that branch of your program is statically inaccessible.