Nat fixes
This commit is contained in:
@@ -8,8 +8,8 @@ myAndC = (c1 c2 value rest :
|
||||
(c1 value rest))
|
||||
|
||||
-- Plain predicates lifted into contracts with a diagnostic message.
|
||||
natural? = guardC "natural" (n : gte? n 0)
|
||||
nonZero? = guardC "non-zero" (n : not? (isZero? n))
|
||||
natural? = guardC "natural" isNat?
|
||||
nonZero? = guardC "non-zero" (n : and? (isNat? n) (not? (isZero_? n)))
|
||||
|
||||
-- Phantom annotations let point-free definitions carry their own contracts.
|
||||
-- The base library now uses the same syntax, so head/tail/div etc. are
|
||||
|
||||
Reference in New Issue
Block a user