Verrrrrry fun!
$ curl -F “input=fun loop () = 1” -F "_method=PUT"
http://www.ats-lang.org/TRYIT/prelude_array_1.dats
{“status”:0, “output”:“Your code has been successfully typechecked!”}
$ curl -F “input=fun loop (): void = 1” -F "_method=PUT"
http://www.ats-lang.org/TRYIT/prelude_array_1.dats
{“status”:1, “output”:"Error:\nexec(/home/project-web/ats-lang/ATS-Postiats/bin/patsopt
–typecheck --dynamic /tmp/M95MGgIj.dats)\nLoading [fixity.ats]
starts!\nLoading [fixity.ats] finishes!\nLoading [basics_pre.sats]
starts!\nLoading [basics_pre.sats] finishes!\nLoading
[basics_sta.sats] starts!\nLoading [basics_sta.sats]
finishes!\nLoading [basics_dyn.sats] starts!\nLoading
[basics_dyn.sats] finishes!\nLoading [basics_gen.sats]
starts!\nLoading [basics_gen.sats] finishes!\n/tmp/M95MGgIj.dats:
21<button class=“syntax-error range-error” data-line-start="1"
data-char-start=“21” data-line-end=“1” data-char-end=“22”>(1,21)
to (1,22)</button>: error(3):
[/home/hwxi/research/Postiats/git/src/pats_trans3_util.dats]:
d3exp_trdn: the dynamic expression cannot be assigned the type
[S2Ecst(atsvoid_t0ype)].\n/tmp/M95MGgIj.dats: 21<button
class=“syntax-error range-error” data-line-start=“1"
data-char-start=“21” data-line-end=“1” data-char-end=“22”>(1,21)
to (1,22)</button>: error(3): mismatch of static terms (tyleq):\nThe
actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind),
S2Eintinf(1))\nThe needed term is: S2Ecst(atsvoid_t0ype)\nTRANS3:
there are [1] errors in total.\nexit(ATS): uncaught exception:
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_error_2esats__FatalErrorException(1025)\nexec(/home/project-web/ats-lang/ATS-Postiats/bin/patsopt
–typecheck --dynamic /tmp/M95MGgIj.dats) = 256\n”}
Kiwamu Okabe at METASEPI DESIGN
I didn’t realize that you could do it like this
By the way, prelude_array_1.dats can be replaced
with any file name with the .dats extension. For instance,
curl -F “input=fun loop () = 1” -F “_method=PUT”
http://www.ats-lang.org/TRYIT/0.datsOn Sunday, June 8, 2014 8:09:09 AM UTC-4, Kiwamu Okabe wrote:
Verrrrrry fun!
$ curl -F “input=fun loop () = 1” -F “_method=PUT”
http://www.ats-lang.org/TRYIT/prelude_array_1.dats
{“status”:0, “output”:“Your code has been successfully typechecked!”}
$ curl -F “input=fun loop (): void = 1” -F “_method=PUT”
http://www.ats-lang.org/TRYIT/prelude_array_1.dats
{“status”:1,
“output”:"Error:\nexec(/home/project-web/ats-lang/ATS-Postiats/bin/patsopt
–typecheck --dynamic /tmp/M95MGgIj.dats)\nLoading [fixity.ats]
starts!\nLoading [fixity.ats] finishes!\nLoading [basics_pre.sats]
starts!\nLoading [basics_pre.sats] finishes!\nLoading
[basics_sta.sats] starts!\nLoading [basics_sta.sats]
finishes!\nLoading [basics_dyn.sats] starts!\nLoading
[basics_dyn.sats] finishes!\nLoading [basics_gen.sats]
starts!\nLoading [basics_gen.sats] finishes!\n/tmp/M95MGgIj.dats:
21<button class="syntax-error range-error" data-line-start="1"
data-char-start="21" data-line-end="1" data-char-end="22">(1,21)
to (1,22)</button>: error(3):
[/home/hwxi/research/Postiats/git/src/pats_trans3_util.dats]:
d3exp_trdn: the dynamic expression cannot be assigned the type
[S2Ecst(atsvoid_t0ype)].\n/tmp/M95MGgIj.dats: 21<button
class="syntax-error range-error" data-line-start="1"
data-char-start="21" data-line-end="1" data-char-end="22">(1,21)
to (1,22)</button>: error(3): mismatch of static terms (tyleq):\nThe
actual term is: S2Eapp(S2Ecst(g1int_int_t0ype); S2Ecst(int_kind),
S2Eintinf(1))\nThe needed term is: S2Ecst(atsvoid_t0ype)\nTRANS3:
there are [1] errors in total.\nexit(ATS): uncaught exception:
_2home_2hwxi_2research_2Postiats_2git_2src_2pats_error_2esats__FatalErrorException(1025)\nexec(/home/project-web/ats-lang/ATS-Postiats/bin/patsopt
–typecheck --dynamic /tmp/M95MGgIj.dats) = 256\n"}
–
Kiwamu Okabe at METASEPI DESIGN