> Why rev1 is ok and rev2-4 throws "Substitution in constructor is blocked by
> a too-deep unification variable" while types seems to be ok?

Include the return type, like this:

fun rev2 [e ::: Type] (xs : list e) (ys : list e) : list e =
     case xs of
        [] => ys
       | x :: xs => rev2 xs (x :: ys)

val intList = 1 :: 2 :: 3 :: []

fun main () = return <xml>
  <head>
    <title>Example</title>
  </head>
  <body>
    <h2>Example</h2>
    <p>
      {[rev2 intList []]}
    </p>
  </body>
</xml>

_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to