on master help sign in
get rid of unused imports
0e5d293Evan Czaplicki
src/Type/Fragment.hs−1
@@ -4,7 +4,6 @@ import qualified Data.List as List
4import qualified Data.Map as Map
4import qualified Data.Map as Map
5
5
6import Type.Type
6import Type.Type
7−import AST.Pattern
8import AST.Annotation (noneNoDocs)
7import AST.Annotation (noneNoDocs)
9
8
10data Fragment = Fragment
9data Fragment = Fragment
src/Type/PrettyPrint.hs+9−5
@@ -1,16 +1,20 @@
1−
2module Type.PrettyPrint where
1module Type.PrettyPrint where
3
2
4import Text.PrettyPrint
3import Text.PrettyPrint
5−import qualified AST.PrettyPrint as Src
4+
6
5
7data ParensWhen = Fn | App | Never
6data ParensWhen = Fn | App | Never
8
7
8+
9class PrettyType a where
9class PrettyType a where
10− pretty :: ParensWhen -> a -> Doc
10+ pretty :: ParensWhen -> a -> Doc
11+
11
12
12commaSep :: [Doc] -> Doc
13commaSep :: [Doc] -> Doc
14+commaSep docs =
13−commaSep docs = sep (punctuate comma docs)
15+ sep (punctuate comma docs)
16+
14
17
15parensIf :: Bool -> Doc -> Doc
18parensIf :: Bool -> Doc -> Doc
19+parensIf bool doc =
16−parensIf bool doc = if bool then parens doc else doc
20+ if bool then parens doc else doc