Skip to content

Linear types: Core Lint error with MultiWayIf

This LinearTypes program fails Lint:

f :: Bool -> a %1-> a
f b x = if | b -> x

The reason: incomplete pattern matching should be wrapped in an empty case, as described in Note [Incompleteness and linearity]. I did not do this for MultiWayIf.

Patch in !6022 (closed).

Edited by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information