ghc-source-gen-0.1.0.0: Constructs Haskell syntax trees for the GHC API.
GHC.SourceGen.Pat
Description
This module provides combinators for constructing Haskell patterns.
wildP :: Pat' Source #
A wild pattern (_).
_
asP :: RdrNameStr -> Pat' -> Pat' Source #
An as-pattern.
a@B ===== asP "a" (var "B")
conP :: RdrNameStr -> [Pat'] -> Pat' Source #
A pattern constructor.
A b c ===== conP "A" [var "b", var "c"]
strictP :: Pat' -> Pat' Source #
A bang-pattern.
!x ===== strictP (var x)
lazyP :: Pat' -> Pat' Source #
A lazy pattern match.
~(A x) ===== lazyP (conP "A" [var x])