On this page:
Cur
6.12

Cur

William J. Bowman <[email protected]>

 #lang cur package: cur-lib

The language cur is a dependently-typed language that arbitrary Racket meta-programs can manipulate. The core language of cur is essentially TT. The trusted core provides nothing beyond this language. However, untrusted code provides, via Racket meta-programming, features such as modules, top-level definitions, multi-arity functions, implicit partial application, syntax notations, a tactic DSL, interactive tactics, and a programming language meta-theory DSL. These features run at compile time and generate curnel forms, forms in the core language, which are type-checked before they are run.

Arbitrary racket code can run at phases higher than 0, but racket code at phase 0 is unsupported and should result in a syntax error. The language cur exports everything in racket, racket/syntax, and syntax/parse at phase 1.

The language cur provides reflection features to equip users with the tools necessary to write advanced meta-programs. These features include compile-time functions for type-checking, performing naïve type inference, deciding equivalence between cur terms, expanding macros in cur forms, and evaluating cur forms at compile-time. Programmers can use these reflection feature with little fear, as the resulting curnel forms will always be type-checked prior to running.

The curnel forms are provided by the trusted core of the language. The reflection forms and procedures are provided by mostly untrusted, but privileged, code. These features require knowledge of and manipulation of the language implementation and could not be implemented by a user via a library. Everything else in cur is provided by untrusted user-land code—code that any user (with sufficient meta-programming expertise) could write and ship as a library.

TODO: Some repetition

    1 Curnel Forms

    2 Reflection

    3 Standard Library

      3.1 Sugar

      3.2 Bool

      3.3 Nat

      3.4 Dependent Pairs

      3.5 Maybe

      3.6 List

      3.7 Typeclass

    4 Olly: Ott-like LibrarY

    5 ntac: The New Tactic System

      5.1 The ntac system

        5.1.1 Usage

        5.1.2 Base Tactics

        5.1.3 Proof Trees

        5.1.4 Proof Tree Zipper

        5.1.5 Tactic System API

      5.2 Standard Tactics and Tacticals

        5.2.1 Interactive Tactic