futhark-0.19.5: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Futhark.TypeChecker.Match

Description

Checking for missing cases in a match expression. Based on "Warnings for pattern matching" by Luc Maranget. We only detect inexhaustiveness here - ideally, we would also like to check for redundant cases.

Synopsis

Documentation

unmatched :: [Pattern] -> [Match] Source #

Find the unmatched cases.

data Match Source #

A representation of the essentials of a pattern.

Instances

Instances details
Eq Match Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

(==) :: Match -> Match -> Bool #

(/=) :: Match -> Match -> Bool #

Ord Match Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

compare :: Match -> Match -> Ordering #

(<) :: Match -> Match -> Bool #

(<=) :: Match -> Match -> Bool #

(>) :: Match -> Match -> Bool #

(>=) :: Match -> Match -> Bool #

max :: Match -> Match -> Match #

min :: Match -> Match -> Match #

Show Match Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

showsPrec :: Int -> Match -> ShowS #

show :: Match -> String #

showList :: [Match] -> ShowS #

Pretty Match Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

ppr :: Match -> Doc #

pprPrec :: Int -> Match -> Doc #

pprList :: [Match] -> Doc #