Skip to content
GitLab
  • Explore
  • Sign in
  • clean-compiler-and-rts
  • compiler
  • Issues
  • #22

Weird error message for impossible anonymous type variable

The below code yields an error because of the dot in front of the tuple type, which is impossible since R is always unique. The error message is not very helpful:

Type error [test2.icl,5,f]:* attribute expected instead of _Tuple2[140449386949760]

I would expect something like, * attribute expected instead of uniqueness type variable, or uniqueness type variable not allowed here (type must be unique).

:: *R = {x :: Int}

f :: !R -> .(R, Int)
f r=:{x} = (r, x)

Start = f {x=5}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking