fn length_last
{l:nat | l > 1 }
(
s: string l
): (int, char) =
let
var env = (0,s.head())
implement stream_vt_foreach$fwork<charNZ><(int,charNZ)>(c,env) =
env := (env.0 + 1, c)
val _ = stream_vt_foreach_env(
streamize_string_char(s.tail()),
env
)
in
env
end
length_last.dats:15:13: the dynamic expression should be a left-value but it is not.
length_last.dats:11:3: the linear dynamic variable [env$view$5548(-1)] is preserved but with an incompatible type.
length_last.dats:11:3: mismatch of static terms (tyleq):
The actual term is: S2Etop(knd=0; [1])
[1]: S2EVar(5260)
The needed term is: S2Etyrec(flt0; npf=-1; 0=S2Etop(knd=0; S2Etop(knd=0; [1])), 1=S2Etop(knd=0; S2Etop(knd=0; [2])))
[1]: g1int_int_t0ype(int_kind, 0)
[2]: charNZ
length_last.dats:11:3: mismatch of static terms (tyleq):
The actual term is: S2Eat(S2Etop(knd=0; [1]); [2])
[1]: S2EVar(5260)
[2]: env
The needed term is: S2Eat(S2Etyrec(flt0; npf=-1; 0=S2Etop(knd=0; S2Etop(knd=0; [1])), 1=S2Etop(knd=0; S2Etop(knd=0; [2]))); [3])
[1]: g1int_int_t0ype(int_kind, 0)
[2]: charNZ
[3]: env
patsopt(TRANS3): there are [2] errors in total.
exit(ATS): uncaught exception: _2home_2deech_2Downloads_2ATS_2ATS2_2src_2pats_error_2esats__FatalErrorExn(1025)
--
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 ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
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/012ab377-9bd9-401d-b738-b9a3efbfd841%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-users+unsubscribe@googlegroups.com.
To post to this group, send email to ats-lang-users@googlegroups.com.
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/fb4f195c-38b8-4ef9-adbf-ab0deadbcfc0%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/fb4f195c-38b8-4ef9-adbf-ab0deadbcfc0%40googlegroups.com.