]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/sml-mode/testcases.sml
Add 'packages/swiper/' from commit '55414c321ca07bd86f0f1efaf8f6130617e6fad6'
[gnu-emacs-elpa] / packages / sml-mode / testcases.sml
index adab3e2893e7a38568fc7f018634d058541c7106..4ed33120423b874ab6e6444563c5a1e3ce405dec 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright 1999,2004,2007,2010-2012 Stefan Monnier <monnier@gnu.org> *)
+(* Copyright 1999,2004,2007,2010-2012,2014 Stefan Monnier <monnier@gnu.org> *)
 
 (* sml-mode here treats the second `=' as an equal op because it
  * thinks it's seeing something like "... type t = (s.t = ...)".  FIXME!  *)
@@ -55,6 +55,53 @@ val bar =
                  c
           ;4)
 
+structure Attrs : sig
+            type t
+            datatype node
+              = Attributes of string list
+            include WRAPPED
+            sharing type node' = node
+            sharing type obj = t
+          end
+
+functor DoWrap1(type node) : S = struct
+type t = node Wrap.t
+open Wrap
+type node' = node
+type obj = t
+end
+
+datatype exp_node
+  = Let of varpat_t list * rhs_t * exp_t
+  | Do of simpleexp_t * exp_t
+  | FunExp of fundef_t list * exp_t
+  | ContExp of BomId.t * varpat_t list option * exp_t * exp_t
+  | If of simpleexp_t * exp_t * exp_t
+  | Case of simpleexp_t * caserule_t list
+  | Typecase of TyParam.t * tycaserule_t list
+  | Apply of LongValueId.t * simpleexp_t list option * simpleexp_t list option
+  | Throw of BomId.t * tyargs_t option * simpleexp_t list option
+  | Return of simpleexp_t list option
+and rhs_node
+    = Composite of exp_t
+    | Simple of simpleexp_t
+
+withtype type_t = type_node Wrap.t
+     and tyargs_t = tyargs_node Wrap.t
+
+functor DoWrap(type node) : sig
+          type t = node Wrap.t
+          include WRAPPED
+          sharing type node' = node
+          sharing type obj = t
+        end =
+struct
+type t = node Wrap.t
+open Wrap
+type node' = node
+type obj = t
+end
+
 val ber = 1;
 val sdfg = 1
 val tut = fn (x,y) z y e r =>
@@ -113,6 +160,7 @@ val x =
 datatype foobar
   = FooB of int
   | FooA of bool * int
+and baz = QUX of foo
 datatype foo = FOO | BAR of baz
      and baz = BAZ | QUUX of foo