X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FhsSyn%2FHsPat.lhs;h=00df7797b42b788be659fb2e4bdc670f78f4676f;hb=5e3f005d3012472e422d4ffd7dca5c21a80fca80;hp=c5fa2c74baa2b743094019ff17d655cbb339e939;hpb=f5a6b456f08ab320ef0d07a08d90a63557c39364;p=ghc-hetmet.git diff --git a/ghc/compiler/hsSyn/HsPat.lhs b/ghc/compiler/hsSyn/HsPat.lhs index c5fa2c7..00df779 100644 --- a/ghc/compiler/hsSyn/HsPat.lhs +++ b/ghc/compiler/hsSyn/HsPat.lhs @@ -9,8 +9,8 @@ module HsPat ( OutPat(..), irrefutablePat, irrefutablePats, - failureFreePat, isWildPat, - patsAreAllCons, isConPat, + failureFreePat, isWildPat, + patsAreAllCons, isConPat, patsAreAllLits, isLitPat, collectPatBinders, collectPatsBinders, collectSigTysFromPat, collectSigTysFromPats @@ -87,6 +87,12 @@ data OutPat id | AsPat id -- as pattern (OutPat id) + | SigPat (OutPat id) -- Pattern p + Type -- Type, t, of the whole pattern + (HsExpr id (OutPat id)) + -- Coercion function, + -- of type t -> typeof(p) + | ListPat -- Syntactic list Type -- The type of the elements [OutPat id] @@ -187,6 +193,8 @@ pprOutPat (LazyPat pat) = hcat [char '~', ppr pat] pprOutPat (AsPat name pat) = parens (hcat [ppr name, char '@', ppr pat]) +pprOutPat (SigPat pat ty _) = ppr pat <+> dcolon <+> ppr ty + pprOutPat (ConPat name ty [] [] []) = ppr name