Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZERO

ZERO extends DIFF with the zero? predicate:

zero?(0)

zero? introduces Boolean values:

zero?(0)
→ true

zero?(1)
→ false

Once expressions can produce both numbers and Booleans, an operation can receive a value of the wrong type:

zero?(zero?(0))

The inner zero? produces a Boolean, but the outer zero? expects a number. ZERO introduces runtime type errors to handle cases like this.

For a closer look, read ZERO: Boolean Values and Runtime Type Errors.

To try it, you'll need Nix with flakes enabled.

nix develop
elm repl

Then:

import ZERO.Interpreter as I

I.run "zero?(-(1, 1))"
-- Ok (VBool True)

About

ZERO extends DIFF with the zero? predicate, Boolean values, and runtime type errors.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages