Thanks for reporting it.

Finally got some time fixing this issue. Basically, records were not
handled. They are now handled.
The changes should go into the next release.

On Wed, Oct 14, 2020 at 5:48 AM Dambaev Alexander <ice.redm...@gmail.com>
wrote:

> Hi,
> I have the following example:
> ```
> #include "share/atspre_define.hats"
> #include "share/atspre_staload.hats"
>
> #define ATS_DYNLOADFLAG 0
>
> implement main0() = {
>   val a = (Some_vt(0), None_vt())
>   val b =
>     case+ a:(Option_vt(int), Option_vt(int)) of (* *9* *)
>     | @( ~Some_vt(_), ~Some_vt(_)):(Option_vt(int), Option_vt(int)) => 0
>     | @( ~Some_vt(_), ~None_vt()):(Option_vt(int), Option_vt(int)) => 1
>     | @( ~None_vt(), ~Some_vt(_)):(Option_vt(int), Option_vt(int)) => 2
>     | @( ~None_vt(), ~None_vt()):(Option_vt(int), Option_vt(int)) => 3 (*
> *13* *)
> }
> ```
> which produces the following error
> ```
> /data/devel/ats2/issue/main.dats: 172(line=9, offs=5) -- 503(line=13,
> offs=71): error(3): pattern match is nonexhaustive:
> @{0= Some_vt(_), 1= None_vt()}
> /data/devel/ats2/issue/main.dats: 172(line=9, offs=5) -- 503(line=13,
> offs=71): error(3): pattern match is nonexhaustive:
> @{0= None_vt()}
> typechecking has failed: there are some unsolved constraints: please
> inspect the above reported error message(s) for information.
> exit(ATS): uncaught exception:
> _2tmp_2ATS_2dPostiats_2src_2pats_error_2esats__FatalErrorExn(1025)
> ```
> I guess it is related to the same "weak type inference" thing, but type
> annotations are not helpful here. Replacing with '*case-*' helps, of
> course, but I would like to know how can I use case+ instead
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/CAHjn2KzL02cZTA7CP_aWMet_Hk%2BtYkMxAAZgejcTjC3%2B36Y8ZA%40mail.gmail.com
> <https://groups.google.com/d/msgid/ats-lang-users/CAHjn2KzL02cZTA7CP_aWMet_Hk%2BtYkMxAAZgejcTjC3%2B36Y8ZA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLrmyUxpzbuwsKF1b%3DCZN_kELm1iqxLenVN9R%2ByjhptX3Q%40mail.gmail.com.

Reply via email to