Created
June 29, 2015 15:26
-
-
Save objmagic/16c4d49a9ee5acc06d70 to your computer and use it in GitHub Desktop.
unbound
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type t = {a:int; b:int} | |
| let init () = {a=1; b=1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module T = struct | |
| open A | |
| let f () = .<fun s -> s.a>. | |
| end | |
| let () = | |
| let open A in | |
| let t = A.init () in | |
| let r_code = .< .~(T.f()) t >. in | |
| print_int (Runcode.run r_code) | |
| (* | |
| File "staging_parser.ml", line 21, characters 23-28: | |
| Error: Unbound module Normal_parser | |
| Fatal error: exception Failure("Error type-checking generated code: scope extrusion?") | |
| *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Build system for ocs library and interpreter | |
| # | |
| OCAMLBUILD = ocamlbuild | |
| METAOCAMLC = metaocamlc | |
| build: | |
| $(OCAMLBUILD) -classic-display -ocamlc $(METAOCAMLC) a.byte b.byte | |
| clean: | |
| ocamlbuild -clean | |
| .PHONY: byte clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment