Link Search Menu Expand Document

Languages-beta : OC-L-11-Module-Implementations.cbs | PRETTY | PDF


Language "OCaml Light"

11 Module implementations

Syntax
  UI : unit-implementation
  ::= (semicolon-pair* module-items semicolon-pair*)?
  
  MIS : module-items 
  ::= definition
    | expr
    | module-items semicolon-pair* module-item

  MI : module-item
  ::= definition
    | semicolon-pair expr

  D : definition
  ::= let-definition
    | type-definition
    | exception-definition
Lexis
  SCP : semicolon-pair ::= ';;'
Semantics
  interpret[[ UI:unit-implementation ]] : =>environments
Rule
  interpret[[  ]] = map( )
Rule
  interpret[[ SCP1* MIS SCP2* ]] = 
    handle-thrown(
      scope(
        ocaml-light-core-library,
        accumulate(define-or-evaluate-items[[ MIS ]])),
      sequential(
        print ("Uncaught exception: ", ocaml-light-to-string given, "\n"),
        map()))