X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FdeSugar%2FMatchCon.lhs;h=8a8e49c8dfad3aa66e3a7d5d9adbe953cbd0661b;hb=235edf36cc202bb21c00d0e5e05ebf076fb0542e;hp=3f25fc7a6eebdee05b09ac610c77705e84a852b7;hpb=00b6d2567426ec52a113b1d3687e1d61368cafda;p=ghc-hetmet.git diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs index 3f25fc7..8a8e49c 100644 --- a/compiler/deSugar/MatchCon.lhs +++ b/compiler/deSugar/MatchCon.lhs @@ -6,6 +6,13 @@ Pattern-matching constructors \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module MatchCon ( matchConFamily ) where #include "HsVersions.h" @@ -119,11 +126,11 @@ conArgPats :: DataCon -> [Type] -- Instantiated argument types -- Used only to fill in the types of WildPats, which -- are probably never looked at anyway - -> HsConDetails Id (LPat Id) + -> HsConDetails (LPat Id) (HsRecFields Id (LPat Id)) -> [Pat Id] conArgPats data_con arg_tys (PrefixCon ps) = map unLoc ps conArgPats data_con arg_tys (InfixCon p1 p2) = [unLoc p1, unLoc p2] -conArgPats data_con arg_tys (RecCon rpats) +conArgPats data_con arg_tys (RecCon (HsRecFields rpats _)) | null rpats = -- Special case for C {}, which can be used for -- a constructor that isn't declared to have