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

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 StructType] -> [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

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

Defined in Language.Futhark.TypeChecker.Match

Methods

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

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

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

Defined in Language.Futhark.TypeChecker.Match

Methods

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

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

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

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

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

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

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

Pretty (Match t) Source # 
Instance details

Defined in Language.Futhark.TypeChecker.Match

Methods

pretty :: Match t -> Doc ann Source #

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