Giter VIP home page Giter VIP logo

fomega's Introduction

Benjamin Pierce's F-omega checker, from

http://www.cis.upenn.edu/~bcpierce/tapl/checkers/fullomega/

Available online at

http://ocamllabs.github.io/fomega/

Syntax

There are two types of variables. Term variables begin with a lowercase letter

a, b, c
x, y, z

Type variables begin with an uppercase or Greek letter

A, B, C
α, β, γ

A program is a sequence of definitions, terminated by semicolons:

program ::= definition ; definition ; ... definition ;

Definitions bind types or terms.

definition ::= α :: kind = type
               x : type = term

You can leave out either the :: kind or the = type component (but not both) from a type binding, and you can leave out either the : type or the = term component (but not both) from a term binding.

Kinds are either *, the type of kinds, or arrow kinds.

kind ::= *
         kind ⇒ kind
         ( kind )

ASCII alternative: you can use => in place of .

Types are defined as follows:

type ::= type → type             (function types)
         type × type             (product types)
         type + type             (sum types)
         ∀ α :: kind . type      (polymorphic types)
         ∃ α :: kind . type      (existential types)
         λ α :: kind . type      (type abstractions)
         type type               (type applications)
         ( type )

ASCII alternatives: -> for , * for ×, All for , EXISTS for , lambda for λ. Kind annotations (:: kind) can be omitted, and default to *.

Terms are defined as follows:

term ::= λ x : type . term
        term term
        ⟨ term , term , ... term ⟩
        @n term                           (nth projection: @1 is fst, @2 is snd)
        inl [ type ] term
        inr [ type ] term
        case term of x.term | y . term
        Λ α :: kind . term
        term [ type ]
        pack type , term, as ∃ α :: kind . type
        open term as α , x in term
        ( term )

ASCII alternatives: lambda for λ, LAMBDA for Λ. Kind annotations (:: kind) can be omitted, and default to *.

Web version

You can run the web version by using: dune exec src/runweb.exe.

fomega's People

Contributors

ilsordo avatar lpw25 avatar yallop avatar zapashcanon avatar zaxtax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fomega's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.