Having a type rule such as this fails silently in ts:

Something(x): t
  where SomethingElse(x): t

Where the intention was to create a new term SomethingElse and get the type of that and assign the result to t.
The editor does not indicate any errors/warnings but the rules cannot be found in the generated file.

Submitted by Arjen on 7 May 2014 at 17:32

On 7 May 2014 at 17:34 Arjen commented:

Edit: This does not work, see comment below.

A workaround seems to be to use something like this

type functions
  build: x -> x

Something(x): ty
   where <build> SomethingElse(x) => t
   and t: ty

Thanks to Gabriel.


On 7 May 2014 at 17:59 Arjen commented:

Actually, there seems to be no workaround in ts, because the result of a type function is wrapped in a task, such that “t: ty” will try to get the type of a task


On 7 May 2014 at 18:01 Gabriël Konat commented:

There is probably a case missing in the generator for the has type operator with a term on the left hand side, instead of just a variable.


On 15 May 2014 at 15:36 Eelco Visser commented:

fixed (in github)


On 15 May 2014 at 15:36 Eelco Visser closed this issue.

Log in to post comments