about summary refs log tree commit diff stats
path: root/cpp/core.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-05 18:56:20 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-05 18:56:20 -0700
commit267ebb590b0a08d6e8bc9e3f8644b491d0d790ac (patch)
treeb0a5106b3a9373764cf1148ce2827301f3fc7510 /cpp/core.mu
parentf2cafededd8d57237263fc7cb7d726ad1eacecd2 (diff)
downloadmu-267ebb590b0a08d6e8bc9e3f8644b491d0d790ac.tar.gz
1018 - build system now handles .mu layers
No support for tests yet. Need to manually run the current test with:
  $ mu string-test.mu

Also, string-equal seems to have a problem.
Diffstat (limited to 'cpp/core.mu')
-rw-r--r--cpp/core.mu36
1 files changed, 0 insertions, 36 deletions
diff --git a/cpp/core.mu b/cpp/core.mu
deleted file mode 100644
index b1fd34d2..00000000
--- a/cpp/core.mu
+++ /dev/null
@@ -1,36 +0,0 @@
-recipe string-equal [
-  default-space:address:space <- new location:type, 30:literal
-  a:address:array:character <- next-ingredient
-  a-len:integer <- length a:address:array:character/deref
-  b:address:array:character <- next-ingredient
-  b-len:integer <- length b:address:array:character/deref
-  # compare lengths
-  {
-    length-equal?:boolean <- equal a-len:integer, b-len:integer
-    break-if length-equal?:boolean
-    reply 0:literal
-  }
-  # compare each corresponding character
-  i:integer <- copy 0:literal
-  {
-    done?:boolean <- greater-or-equal i:integer, a-len:integer
-    break-if done?:boolean
-    a2:character <- index a:address:array:character/deref, i:integer
-    b2:character <- index b:address:array:character/deref, i:integer
-    {
-      chars-match?:boolean <- equal a2:character, b2:character
-      break-if chars-match?:boolean
-      reply 0:literal
-    }
-    i:integer <- add i:integer, 1:literal
-    loop
-  }
-  reply 1:literal
-]
-
-recipe main [
-  default-space:address:space <- new location:type, 30:literal
-  x:address:array:character <- new [abc]
-  y:address:array:character <- new [abd]
-  3:boolean/raw <- string-equal x:address:array:character, y:address:array:character
-]