type option 'a = #some a | #none
let bind 'a 'b (m: option a) (f: a -> option b): option b =
match m
case #none -> #none
case #some a -> f a
entry foo (n: i32): bool =
match bind (if n == 0 then #some () else #none)
(\() -> #some true)
case #some res -> res
case #none -> true
produces the error
processFlatPattern: insufficient identifiers in pattern.([Ident {identName = VName (Name "nameless") 3915, identType = Info {unInfo = Scalar (Prim Bool)}, identSrcLoc = noLoc}],[])
CallStack (from HasCallStack):
error, called at src/Futhark/Internalise/Bindings.hs:96:7 in futhark-0.19.0-2V6GCosZ0r28tYyck4f4gH:Futhark.Internalise.Bindings
The program
produces the error
when run with
futhark c
from git.