shen-ruby 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.md +4 -0
- data/README.md +7 -6
- data/bin/srrepl +5 -0
- data/lib/shen_ruby/version.rb +1 -1
- data/shen/lib/shen_ruby/shen.rb +2 -3
- data/shen/release/k_lambda/declarations.kl +223 -217
- data/shen/release/k_lambda/reader.kl +4 -0
- data/shen/release/k_lambda/t-star.kl +1171 -961
- data/shen/release/k_lambda/toplevel.kl +1 -1
- data/shen/release/k_lambda/types.kl +41 -35
- metadata +2 -2
@@ -27,7 +27,7 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
|
|
27
27
|
|
28
28
|
(defun version (V568) (set *version* V568))
|
29
29
|
|
30
|
-
(version "version
|
30
|
+
(version "version 8")
|
31
31
|
|
32
32
|
(defun shen-credits ()
|
33
33
|
(do (intoutput "~%Shen 2010, copyright (C) 2010 Mark Tarver~%" ())
|
@@ -15,12 +15,12 @@
|
|
15
15
|
|
16
16
|
For an explication of this license see http://www.lambdassociates.org/News/june11/license.htm which explains this license in full."
|
17
17
|
|
18
|
-
(defun declare (
|
19
|
-
(let Record (set shen-*signedfuncs* (adjoin
|
18
|
+
(defun declare (V1679 V1680)
|
19
|
+
(let Record (set shen-*signedfuncs* (adjoin V1679 (value shen-*signedfuncs*)))
|
20
20
|
(let Variancy
|
21
|
-
(trap-error (shen-variancy-test
|
22
|
-
(let Type (shen-rcons_form (shen-normalise-type
|
23
|
-
(let F* (concat shen-type-signature-of-
|
21
|
+
(trap-error (shen-variancy-test V1679 V1680) (lambda E shen-skip))
|
22
|
+
(let Type (shen-rcons_form (shen-normalise-type V1680))
|
23
|
+
(let F* (concat shen-type-signature-of- V1679)
|
24
24
|
(let Parameters (shen-parameters 1)
|
25
25
|
(let Clause
|
26
26
|
(cons (cons F* (cons X ()))
|
@@ -33,43 +33,43 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
|
|
33
33
|
(append Parameters
|
34
34
|
(append (cons ProcessN (cons Continuation ()))
|
35
35
|
(cons -> (cons Code ()))))))
|
36
|
-
(let Eval (shen-eval-without-macros ShenDef)
|
36
|
+
(let Eval (shen-eval-without-macros ShenDef) V1679)))))))))))
|
37
37
|
|
38
|
-
(defun shen-normalise-type (
|
39
|
-
(fix (lambda
|
38
|
+
(defun shen-normalise-type (V1681)
|
39
|
+
(fix (lambda V1682 (shen-normalise-type-help V1682)) V1681))
|
40
40
|
|
41
|
-
(defun shen-normalise-type-help (
|
41
|
+
(defun shen-normalise-type-help (V1683)
|
42
42
|
(cond
|
43
|
-
((cons?
|
43
|
+
((cons? V1683)
|
44
44
|
(shen-normalise-X
|
45
|
-
(map (lambda
|
46
|
-
(true (shen-normalise-X
|
45
|
+
(map (lambda V1684 (shen-normalise-type-help V1684)) V1683)))
|
46
|
+
(true (shen-normalise-X V1683))))
|
47
47
|
|
48
|
-
(defun shen-normalise-X (
|
49
|
-
(let Val (assoc
|
50
|
-
(if (empty? Val)
|
48
|
+
(defun shen-normalise-X (V1685)
|
49
|
+
(let Val (assoc V1685 (value shen-*synonyms*))
|
50
|
+
(if (empty? Val) V1685 (tl Val))))
|
51
51
|
|
52
|
-
(defun shen-variancy-test (
|
53
|
-
(let TypeF (shen-typecheck
|
52
|
+
(defun shen-variancy-test (V1686 V1687)
|
53
|
+
(let TypeF (shen-typecheck V1686 B)
|
54
54
|
(let Check
|
55
55
|
(if (= symbol TypeF) shen-skip
|
56
|
-
(if (shen-variant? TypeF
|
56
|
+
(if (shen-variant? TypeF V1687) shen-skip
|
57
57
|
(intoutput "warning: changing the type of ~A may create errors~%"
|
58
|
-
(@p
|
58
|
+
(@p V1686 ()))))
|
59
59
|
shen-skip)))
|
60
60
|
|
61
|
-
(defun shen-variant? (
|
62
|
-
(cond ((=
|
63
|
-
((and (cons?
|
64
|
-
(shen-variant? (tl
|
65
|
-
((and (cons?
|
66
|
-
(and (cons?
|
67
|
-
(shen-variant? (subst shen-a (hd
|
68
|
-
(subst shen-a (hd
|
69
|
-
((and (cons?
|
70
|
-
(and (cons? (hd
|
71
|
-
(shen-variant? (append (hd
|
72
|
-
(append (hd
|
61
|
+
(defun shen-variant? (V1696 V1697)
|
62
|
+
(cond ((= V1697 V1696) true)
|
63
|
+
((and (cons? V1696) (and (cons? V1697) (= (hd V1697) (hd V1696))))
|
64
|
+
(shen-variant? (tl V1696) (tl V1697)))
|
65
|
+
((and (cons? V1696)
|
66
|
+
(and (cons? V1697) (and (shen-pvar? (hd V1696)) (variable? (hd V1697)))))
|
67
|
+
(shen-variant? (subst shen-a (hd V1696) (tl V1696))
|
68
|
+
(subst shen-a (hd V1697) (tl V1697))))
|
69
|
+
((and (cons? V1696)
|
70
|
+
(and (cons? (hd V1696)) (and (cons? V1697) (cons? (hd V1697)))))
|
71
|
+
(shen-variant? (append (hd V1696) (tl V1696))
|
72
|
+
(append (hd V1697) (tl V1697))))
|
73
73
|
(true false)))
|
74
74
|
|
75
75
|
(declare absvector? (cons A (cons --> (cons boolean ()))))
|
@@ -313,13 +313,17 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
|
|
313
313
|
(declare read-byte
|
314
314
|
(cons (cons stream (cons in ())) (cons --> (cons number ()))))
|
315
315
|
|
316
|
-
(declare read-file
|
317
|
-
(cons string (cons --> (cons (cons list (cons unit ())) ()))))
|
318
|
-
|
319
316
|
(declare read-file-as-bytelist
|
320
317
|
(cons string (cons --> (cons (cons list (cons number ())) ()))))
|
321
318
|
|
322
|
-
(declare read-file-as-string
|
319
|
+
(declare read-file-as-string
|
320
|
+
(cons string (cons --> (cons string ()))))
|
321
|
+
|
322
|
+
(declare read-file
|
323
|
+
(cons string (cons --> (cons (cons list (cons unit ())) ()))))
|
324
|
+
|
325
|
+
(declare read-from-string
|
326
|
+
(cons string (cons --> (cons (cons list (cons unit ())) ()))))
|
323
327
|
|
324
328
|
(declare remove
|
325
329
|
(cons A
|
@@ -388,6 +392,8 @@ For an explication of this license see http://www.lambdassociates.org/News/june1
|
|
388
392
|
|
389
393
|
(declare tuple? (cons A (cons --> (cons boolean ()))))
|
390
394
|
|
395
|
+
(declare shen-undefmacro (cons symbol (cons --> (cons symbol ()))))
|
396
|
+
|
391
397
|
(declare union
|
392
398
|
(cons (cons list (cons A ()))
|
393
399
|
(cons -->
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shen-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|