diff --git a/README.md b/README.md index 04844b9..df732bd 100644 --- a/README.md +++ b/README.md @@ -54,9 +54,10 @@ $ make do_test 3. [parser.ml](src2/parser.ml) パーサ 4. [to_if.ml](src/to_if.ml) match if 変換 5. [alpha.ml](src3/alpha.ml) α変換 - 6. [javascript.ml](src3/javascript.ml) javascript変換 - 7. [emit.ml](src3/emit.ml) JavaScript出力 - 8. [main.ml](src2/main.ml) メイン + 6. [inline.ml](src3/inline.ml) インライン展開 + 8. [javascript.ml](src3/javascript.ml) javascript変換 + 9. [emit.ml](src3/emit.ml) JavaScript出力 + 10. [main.ml](src2/main.ml) メイン ## TODO diff --git a/src3/inline.ml b/src3/inline.ml index a27c127..aaf5a79 100644 --- a/src3/inline.ml +++ b/src3/inline.ml @@ -27,7 +27,7 @@ let inline env (zs,e) (ys:e list) = Alpha.g zs e -let rec g (env:(string * (string list * e)) list ) = function +let rec g env = function | Match (_, _) | Tuple _| Array (_, _)| CApp (_, _) -> assert false | Int(i) -> Int(i) | Float(i) -> Float(i) diff --git a/test/ref.ml b/test/ref.ml index 1669068..3eeee40 100644 --- a/test/ref.ml +++ b/test/ref.ml @@ -9,5 +9,5 @@ print_newline(); let rec f a1 = a := 1000; a1 -in print_int(f !a); +in print_int(-f !a); print_newline()