Skip to content

Instantly share code, notes, and snippets.

Inferno Programming Language - Function Reference

Comments

Inferno supports two types of comments, // for single-line comments and /* ... */ for multi-line comments. Numeric Literals

Inferno supports both integer and floating-point literals. The type of the literal is inferred by the context in which it appears.

Examples:

Introduction To Inferno

This document provides an overview of Inferno, a new hybrid scripting language based on languages like OCaml and Haskell. The language is highly restricted and is designed to allow developers to write code that can be evaluated to produce expected results.

Syntax

The language supports a variety of expressions that can be used to build complex programs. Here is an example of an expression:


Array.sum (Array.keepSomes [Some 3.0, None, Some 4.0])

Introduction To Inferno

This document provides an overview of Inferno, a new hybrid scripting language based on languages like OCaml and Haskell. The language is highly restricted and is designed to allow developers to write code that can be evaluated to produce expected results.

Syntax

The language supports a variety of expressions that can be used to build complex programs. Here is an example of an expression:


Array.sum (Array.keepSomes [Some 3.0, None, Some 4.0])
------------------------------ MODULE Project ------------------------------
EXTENDS Naturals, Sequences
VARIABLES devs, projects, time
vars == << devs, projects, time >>
ProductName =={"PA", "PB", "PC","PD"}
DevName == {"J","B"}
@smurphy8
smurphy8 / FractionalBoundedExample.hs
Last active September 22, 2020 04:18
Fractional bound allow precise definition of upper and lower bounds of a particular number
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
@smurphy8
smurphy8 / kiosk-gist.json
Created September 4, 2019 18:25
Kiosk API
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Mock Kiosk Server API",
"license": {
"name": "Private License"
},
"description": "This is the mock kiosk server API. It is intended for client development use. All routes, unless otherwise specified, will be available in the production version."
},

Operator:

  • [] Insure operator has SCADA host access to well

  • [] Insure operator gets alarm callouts via text/email via host

Operator:

[ ] Insure operator has SCADA host access to well

[ ] Insure operator gets alarm callouts via text/email via host

@smurphy8
smurphy8 / BLEClient.hs
Created October 30, 2017 21:53
BLE Client
{-# LANGUAGE BangPatterns #-}
module Main (main) where
import Bluetooth
import Control.Monad.IO.Class
import Control.Concurrent
import Data.Bits (testBit)
import Data.Word (Word16)
import Data.List
@smurphy8
smurphy8 / blink-notes.org
Created October 6, 2017 15:18
Text describing various blink operations