aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap/verify.bqn
blob: c3b9d737ccbe025266be8a903ab191c85ddc99f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
glyphs  •Import "../glyphs.bqn"
gl  ("⟨""⟩"«∾","¨'"'(⊣∾∾˜)¨glyphs)      # Has to replace •args in c.bqn

f  "../c.bqn"("boot"∾∾".bqn")¨'1'+↕3   # Files to test
c  (13/glyphs•Import,•Import) {𝕎𝕩}¨ f  # Resulting compilers
c  (glyphs){𝕗𝕏}¨ c
t  (∾∾(@+10)¨)¨ (¯5↓∾gl˙) •FLines¨ f # Compiler source

# 4⊸↑ to strip source info
# ⋈⁼∘∾⍟=¨⌾(2⊑¨2⊸⊑) to turn only-dyadic functions to ambivalent
! (4)´ (2c) {𝕎𝕩}¨ t
•Out "Boot -1 verified!"
! (=¨(2¨2) 4)´ (02c) {𝕎𝕩}¨ 1t
•Out "Boot -2 verified!"
! (=¨(2¨2) 4)´ (03c) {𝕎𝕩}¨ 2t
•Out "Boot -3 verified!"