Sha256: 80ef7655b6b9154087b3f6108483da8f42b8f87d47314d57f3a296ad62a24031

Contents?: true

Size: 1.04 KB

Versions: 17

Compression:

Stored size: 1.04 KB

Contents

(specialise defun)
(specialise lambda')

(datatype tiny_lisp_type_theory

  let Lambda (mk_lambda Xs Body)
  F : A >> Lambda : A;
  __________________
  (defun F Xs Body) : A;

  let X* (gensym &&x)
  let Y* (subst X* X Y)
  X* : A >> Y* : B;
  _____________________
  (lambda' (X) Y) : (A --> B);

  F : (A --> B); X : A;
  ________________
  (F X) : B;

  ____________________________
  lispif : (bool --> (A --> (A --> A)));

  ________________________
  equal : (A --> (A --> bool));

  ___________________________
  lispcons : (A --> ((list A) --> (list A)));

  ______________
  car : ((list A) --> A);

  _______________
  cdr : ((list A) --> (list A));

  if (element? F [succ prec])
  ____________________
  F : (number --> number);

  ___________
  (tee!) : bool;

  ____________
  (empty!) : (list A);

  ________
  (empty!) : bool;

  if (symbol? X)
  ____________
  (quote X) : symbol;)

(define mk_lambda
   [X] Body -> [lambda' [X] Body]
   [X | Y] Body -> [lambda' [X] (mk_lambda Y Body)])

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
shen-ruby-0.15.1 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.15.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.14.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.13.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.10.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.9.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.8.1 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.8.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.7.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.6.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.5.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.4.1 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.4.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.3.1 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.3.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.2.0 shen/release/test_programs/TinyTypes.shen
shen-ruby-0.1.0 shen/release/test_programs/TinyTypes.shen