News for hackers. Stuff that matters.
Re:Dependent Haskell by joppy on Tuesday December 18, 2018 @06:45AM (#18705861)
Most typed programming languages will allow you to form a pair of type (Integer, Integer), and reject programs which try to return something like (Integer, Float).

Dependently typed languages might allow you to declare a type (n, m) where n and m are integers, and n < m, and will reject programs which attempt to return pairs with n > m.

The key step here is that this rejection is done during compilation, and so while your program is running you can be absolutely sure that n < m.

There are no comments on this comment yet.