Commit 6638cc53 authored by Pietro Abate's avatar Pietro Abate

Create cduce_test.cma for easy testing

parent f7d126f9
......@@ -3,4 +3,14 @@ true: -traverse
<misc>: include
<types>: include
<tests/libtest/tests.*>: package(oUnit)
<parser>: include
<typing>: include
<compile>: include
<schema>: include
<runtime>: include
<{misc,types,typing,schema,compile,runtime}/*.cmx>: for-pack(Cduce_test)
<parser/**>: package(ulex), package(netstring), syntax(camlp4o)
<schema/**>: package(pcre), package(netstring)
<runtime/**>: package(pcre), package(netstring)
<tests/libtest/tests.*>: package(netstring), package(pcre), package(oUnit), package(ulex), package(num), package(camlp4.lib), use_cduce_lib
Upool
Serialize
Custom
Encodings
Imap
State
Pool
Ns
SortedList
Atoms
Bool
Chars
Ident
Intervals
Inttbl
Normal
Pretty
Stats
Types
Compunit
Ast
Parser
Builtin_defs
Cduce_loc
Sequence
Sample
Patterns
Lambda
Value
Run_dispatch
Explain
Serial
Html
Ulexer
Typed
Typer
Externals
Typepat
Eval
Builtin
Schema_validator
Schema_common
Schema_pcre
Schema_xml
Schema_builtin
Print_xml
Load_xml
Url
Operators
open Ocamlbuild_plugin;;
Options.use_ocamlfind := true ;;
open Command ;;
let _ = dispatch begin function
| After_rules ->
ocaml_lib ~extern:true ~dir:"_build" "cduce_test"
| _ -> ()
end;;
This diff is collapsed.
open OUnit
(* open Types *)
let parse_typ s =
let st = Stream.of_string s in
let astpat = Parser.pat st in
let nodepat = Typer.typ Typer.empty_env astpat in
Types.descr nodepat
;;
let t1 = Types.descr (Typer.typ Builtin.env (Parser.pat (Stream.of_string "`A :> Int")) );;
let t2 = Types.descr (Typer.typ Builtin.env (Parser.pat (Stream.of_string "Any")) );;
Types.subtype t1 t2 ;;
parse_typ "Int";;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment