ipso
ipso copied to clipboard
Detect incomplete pattern matches
Incomplete pattern matches aren't detected during type checking and will cause a runtime failure.
f : (| A : String, B : String |) -> String
f x =
case x of
A a -> a
main : IO ()
main = println <| f (B "b")
I'd like ipso to tell me when I've missed a pattern; usually it's unintentional.
Pattern match completeness is a big topic. I might want to break the feature down by type. I might also be able to separate "detecting incomplete patterns" from "calculating missing patterns".