GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tinyinterpreters/zero: ZERO extends DIFF with the zero? predicate, Boolean values, and runtime type errors.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
src/ZERO
src/ZERO
 
 
tests/Test
tests/Test
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
elm.json
elm.json
 
 
flake.lock
flake.lock
 
 
flake.nix
flake.nix
 
 

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.

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.

blog.tinyinterpreters.dev/posts/zero/

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.