cosmetic changes.
This commit is contained in:
parent
6102c2d1b6
commit
864666490a
8
Info.hs
8
Info.hs
@ -121,9 +121,9 @@ infoThing str = do
|
|||||||
|
|
||||||
filterOutChildren :: (a -> TyThing) -> [a] -> [a]
|
filterOutChildren :: (a -> TyThing) -> [a] -> [a]
|
||||||
filterOutChildren get_thing xs
|
filterOutChildren get_thing xs
|
||||||
= [x | x <- xs, not (getName (get_thing x) `elemNameSet` implicits)]
|
= [x | x <- xs, not (getName (get_thing x) `elemNameSet` implicits)]
|
||||||
where
|
where
|
||||||
implicits = mkNameSet [getName t | x <- xs, t <- implicitTyThings (get_thing x)]
|
implicits = mkNameSet [getName t | x <- xs, t <- implicitTyThings (get_thing x)]
|
||||||
|
|
||||||
pprInfo :: PrintExplicitForalls -> (TyThing, GHC.Fixity, [Gap.ClsInst]) -> SDoc
|
pprInfo :: PrintExplicitForalls -> (TyThing, GHC.Fixity, [Gap.ClsInst]) -> SDoc
|
||||||
pprInfo pefas (thing, fixity, insts)
|
pprInfo pefas (thing, fixity, insts)
|
||||||
@ -132,8 +132,8 @@ pprInfo pefas (thing, fixity, insts)
|
|||||||
$$ vcat (map pprInstance insts)
|
$$ vcat (map pprInstance insts)
|
||||||
where
|
where
|
||||||
show_fixity fx
|
show_fixity fx
|
||||||
| fx == defaultFixity = Outputable.empty
|
| fx == defaultFixity = Outputable.empty
|
||||||
| otherwise = ppr fx <+> ppr (getName thing)
|
| otherwise = ppr fx <+> ppr (getName thing)
|
||||||
|
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
4
Lint.hs
4
Lint.hs
@ -6,9 +6,9 @@ import Language.Haskell.HLint
|
|||||||
import Types
|
import Types
|
||||||
|
|
||||||
lintSyntax :: Options -> String -> IO String
|
lintSyntax :: Options -> String -> IO String
|
||||||
lintSyntax opt file = pretty <$> lint opt file
|
lintSyntax opt file = pack <$> lint opt file
|
||||||
where
|
where
|
||||||
pretty = unlines . map (intercalate "\0" . lines)
|
pack = unlines . map (intercalate "\0" . lines)
|
||||||
|
|
||||||
lint :: Options -> String -> IO [String]
|
lint :: Options -> String -> IO [String]
|
||||||
lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)
|
lint opt file = map show <$> hlint ([file, "--quiet"] ++ hlintOpts opt)
|
||||||
|
Loading…
Reference in New Issue
Block a user