on master help sign in
Cosmetic: use a qualified import to clarify uses of isTuple
c602071Evan Czaplicki
compiler/SourceSyntax/Pattern.hs+3−3
@@ -1,7 +1,7 @@
1{-# OPTIONS_GHC -Wall #-}
1{-# OPTIONS_GHC -Wall #-}
2module SourceSyntax.Pattern where
2module SourceSyntax.Pattern where
3
3
4−import SourceSyntax.Helpers as Help
4+import qualified SourceSyntax.Helpers as Help
5import SourceSyntax.PrettyPrint
5import SourceSyntax.PrettyPrint
6import Text.PrettyPrint as PP
6import Text.PrettyPrint as PP
7import qualified Data.Set as Set
7import qualified Data.Set as Set
@@ -51,7 +51,7 @@ instance Pretty Pattern where
51 PData "::" _ -> True
51 PData "::" _ -> True
52 _ -> False
52 _ -> False
53 PData name ps ->
53 PData name ps ->
54− if isTuple name then
54+ if Help.isTuple name then
55 PP.parens . commaCat $ map pretty ps
55 PP.parens . commaCat $ map pretty ps
56 else hsep (PP.text name : map prettyParens ps)
56 else hsep (PP.text name : map prettyParens ps)
57
57
@@ -60,6 +60,6 @@ prettyParens pattern = parensIf needsThem (pretty pattern)
60 where
60 where
61 needsThem =
61 needsThem =
62 case pattern of
62 case pattern of
63− PData name (_:_) | not (isTuple name) -> True
63+ PData name (_:_) | not (Help.isTuple name) -> True
64 PAlias _ _ -> True
64 PAlias _ _ -> True
65 _ -> False
65 _ -> False