diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-02 14:38:42 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-12-02 14:42:53 +0000 |
commit | 52b02e66025f029ca1b99dfccedca909fdc86831 (patch) | |
tree | 43c928cc7fdd7ddc9286126f53a1735c9c48a7eb /compiler/hsSyn/HsPat.hs | |
parent | 741f837d652fd00671614d52a6cb16fbc3758480 (diff) | |
download | haskell-52b02e66025f029ca1b99dfccedca909fdc86831.tar.gz |
Comments only (isIrrefutablePat)
Diffstat (limited to 'compiler/hsSyn/HsPat.hs')
-rw-r--r-- | compiler/hsSyn/HsPat.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/hsSyn/HsPat.hs b/compiler/hsSyn/HsPat.hs index 24ef065e2a..359990a66a 100644 --- a/compiler/hsSyn/HsPat.hs +++ b/compiler/hsSyn/HsPat.hs @@ -540,8 +540,12 @@ isIrrefutableHsPat :: OutputableBndr id => LPat id -> Bool -- (NB: this is not quite the same as the (silly) defn -- in 3.17.2 of the Haskell 98 report.) -- --- isIrrefutableHsPat returns False if it's in doubt; specifically --- on a ConPatIn it doesn't know the size of the constructor family +-- WARNING: isIrrefutableHsPat returns False if it's in doubt. +-- Specifically on a ConPatIn, which is what it sees for a +-- (LPat Name) in the renamer, it doesn't know the size of the +-- constructor family, so it returns False. Result: only +-- tuple patterns are considered irrefuable at the renamer stage. +-- -- But if it returns True, the pattern is definitely irrefutable isIrrefutableHsPat pat = go pat |