futhark-0.25.32: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

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

- unmatched :: [Pat StructType] -> [Match ()]
- data Match t

# 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 Methods showsPrec :: Int -> Match t -> ShowS Source # show :: Match t -> String Source # showList :: [Match t] -> ShowS Source #
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 #