futhark-0.23.1: 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 :: [Pat] -> [Match ()] Source #

Find the unmatched cases.

data Match t Source #

A representation of the essentials of a pattern.

Instances

Instances details
Show t => Show (Match t) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

showsPrec :: Int -> Match t -> ShowS #

show :: Match t -> String #

showList :: [Match t] -> ShowS #

Eq t => Eq (Match t) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

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

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

Ord t => Ord (Match t) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

compare :: Match t -> Match t -> Ordering #

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

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

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

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

max :: Match t -> Match t -> Match t #

min :: Match t -> Match t -> Match t #

Pretty (Match t) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

pretty :: Match t -> Doc ann #

prettyList :: [Match t] -> Doc ann #