au-ts / cogent

Cogent Project
https://trustworthy.systems/projects/TS/cogent.pml
Other
158 stars 26 forks source link

Pattern match failure in Inference.hs #399

Closed gteege closed 3 years ago

gteege commented 3 years ago

The following code

type A = { m : U32 }

f :  A  -> (A,U32)
f a = (a, if (0 == a.m) !a then 0 else 1)

causes the error message

Parsing...
Resolving dependencies...
Typechecking...
Desugaring and typing...
cogent: Pattern match failure in do expression at src/Cogent/Inference.hs:553:9-14

This happens in master branch in commit 4849f8ca112c with and without builtin-arrays.