I can't figure out why this code loops forever. Is it a bug in the compiler?

#include "share/atspre_staload.hats"
#include "share/atspre_define.hats"

staload UN = "prelude/SATS/unsafe.sats"

abst0ype foo(a:t0ype) = lint
abst0ype twice(a:t0ype) = int

extern fun{a:t@ype} myprint (x: string): void

implement(a) myprint<twice(a)>(x) =
  let
    val f = myprint<a>
  in
    f(x);
    f(x);
  end

implement(a) myprint<foo(a)>(x) =
  begin
    print("foo(");
    myprint<a>(x);
    print(")");
  end

implement myprint<int>(x) = print(x)

implement main0() =
  let
    val x = "LOOP"
  in
    myprint<twice(foo(int))>(x)
  end



-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/bf714b63-50da-41c2-9ebc-0f74194572a4%40googlegroups.com.

Reply via email to