Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Refinement types in Haskell as a library. Parent comment
An example from that paper:
type Nat = {v:Int | 0 <=v } type Pos = {v:Int | 0 < v } div :: Nat -> d:Pos -> {v:Nat | v <= n}
fun slice {n:int | n >= 1} (a:int n, b:list)
There are no comments on this comment yet.
An example from that paper:
The ATS programming language (http://www.ats-lang.org) is more ML-like than Haskell-like but can have ranged integer types. Something like: