Fix prefix operator pattern-match invalid result
parent
8861f16624
commit
702b993dab
|
@ -668,3 +668,7 @@ nand _ _ = True
|
||||||
|
|
||||||
nor False False = True
|
nor False False = True
|
||||||
_ `nor` _ = False
|
_ `nor` _ = False
|
||||||
|
|
||||||
|
#test issue 256 prefix operator match
|
||||||
|
|
||||||
|
f ((:) a as) = undefined
|
||||||
|
|
|
@ -86,7 +86,7 @@ layoutPat (ghcDL -> lpat@(L _ pat)) = docWrapNode lpat $ case pat of
|
||||||
-- return $ (x1' Seq.<| middle) Seq.|> xN'
|
-- return $ (x1' Seq.<| middle) Seq.|> xN'
|
||||||
ConPatIn lname (PrefixCon args) -> do
|
ConPatIn lname (PrefixCon args) -> do
|
||||||
-- Abc a b c -> expr
|
-- Abc a b c -> expr
|
||||||
let nameDoc = lrdrNameToText lname
|
nameDoc <- lrdrNameToTextAnn lname
|
||||||
argDocs <- layoutPat `mapM` args
|
argDocs <- layoutPat `mapM` args
|
||||||
if null argDocs
|
if null argDocs
|
||||||
then return <$> docLit nameDoc
|
then return <$> docLit nameDoc
|
||||||
|
|
Loading…
Reference in New Issue