b0VIM 7.40RY~jhalatom-kha.local~jhala/research/liquid/liquidhaskell/docs/tutorial/new/lhs/01_SimpleRefinements.lhsutf-8 3210#"! Utp&ad{}[<udS4)(!  c X W V N F E / . ) (   s  | { z _ D C *   N   o n m h g 7  vupo*lkjQ87' {zbJI,sreZONGFA@3 {pohgbaJI~}vuponracts: Functio
\end{code}infixr `C`\begin{code}
Demo:

\end{code}nats = 0 `C` 1 `C` 3 `C` N{-@ nats :: L Nat @-}\begin{code}
*Every element* in `nats` is non-negative:

\end{code}data L a = N | C a (L a)\begin{code}
\end{code}infixr `C`\begin{code}Lets take a look.Demo

Refinement types via special comments `{-@ ... @-}`

\end{code}zero = 0{-@ zero :: EqZero @-}\begin{code}
Integers equal to `0`-------Example\end{code}{-@ type EqZero = {v:Int | v = 0} @-}\begin{code}
Integers equal to `0`-------Example------------------Types + Predicates =======================Simple Refinement Types
\end{code}range :: Int -> Int -> L Intodds :: L Intevens :: L Intnats :: L Intabs :: Int -> IntsafeDiv :: Int -> Int -> Intzero' :: Intzero :: Int-- boring haskell type sigsimport Prelude hiding (abs, max)import Language.Haskell.Liquid.Preludemodule SimpleRefinements where{-@ LIQUID "--no-termination" @-}\begin{code}