Giml logo Giml

A strict, purely functional programming language

Giml is a strict, statically typed, purely functional programming language with emphasis on structural typing developed live on stream. See the project page for more information.

Example Code

-- linked list data type and map operation

main = ffi( "console.log", head (map (add 1) list) )

List a =
	| Nil
	| Cons { head : a, tail : List a }

list =
	Cons { head: 1, tail: Cons { head: 2, tail: Nil } }

head list =
	case list of
		| Cons { head: head } ->
			head

map f xs =
	case xs of
		| Nil -> Nil
		| Cons { head: x, tail: rest } ->
			Cons { head: f x, tail: map f rest }

Features

  • ✓ First-class Functions
  • ✓ Algebraic Data Types
  • ✓ Pattern Matching
  • ✓ Extensible Records
  • ✓ Polymorphic Variants
  • ✓ Higher Kinded Types
  • ✓ Purely Functional
  • ✓ Strict Evaluation
  • ✓ Static Typing & Type Inference
  • ○ Written in Haskell
  • ○ Targets JavaScript

More info here.