Тут не исправить уже ничего, Господь, жги! Войти !bnw Сегодня Клубы

3.9 so
The so data type is a predicate on Bool which guarantees that the value is true:

data so : Bool -> Type where
    oh : so True

This is most useful for providing a static guarantee that a dynamic check has been made. For example, we
might provide a safe interface to a function which draws a pixel on a graphical display as follows, where
so (inBounds x y) guarantees that the point (x,y) is within the bounds of a 640 × 480 window:

inBounds : Int -> Int -> Bool
inBounds x y = x >= 0 && x < 640 && y >= 0 && y < 480
drawPoint : (x : Int) -> (y : Int) -> so (inBounds x y) -> IO ()
drawPoint x y p = unsafeDrawPoint x y

ле к

#IDKL52 / @ulidtko / 3605 дней назад

ого, смотрите: с маркдауном можно даже не сосать!
#IDKL52/PTB / @ulidtko / 3605 дней назад
@lexszero ййеп
#IDKL52/STP / @ulidtko --> #IDKL52/MWB / 3605 дней назад
стабильно
#IDKL52/TDT / @238328 / 3604 дня назад
ipv6 ready BnW для ведрофона BnW на Реформале Викивач Котятки

Цоперайт © 2010-2016 @stiletto.