cosmetic change.
This commit is contained in:
parent
b11475821e
commit
86d5419309
13
Types.hs
13
Types.hs
@ -11,19 +11,22 @@ import GHC.Paths (libdir)
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
||||||
data OutputStyle = LispStyle | PlainStyle
|
data OutputStyle = LispStyle | PlainStyle
|
||||||
|
|
||||||
data Options = Options {
|
data Options = Options {
|
||||||
outputStyle :: OutputStyle
|
outputStyle :: OutputStyle
|
||||||
, hlintOpts :: [String]
|
, hlintOpts :: [String]
|
||||||
, ghcOpts :: [String]
|
, ghcOpts :: [String]
|
||||||
, operators :: Bool
|
, operators :: Bool
|
||||||
}
|
}
|
||||||
|
|
||||||
convert :: Options -> [String] -> String
|
convert :: Options -> [String] -> String
|
||||||
convert Options{outputStyle = LispStyle} ms = "(" ++ unwords quoted ++ ")\n"
|
convert Options{ outputStyle = LispStyle } ms = "(" ++ unwords quoted ++ ")\n"
|
||||||
where
|
where
|
||||||
quote x = "\"" ++ x ++ "\""
|
quote x = "\"" ++ x ++ "\""
|
||||||
quoted = map quote ms
|
quoted = map quote ms
|
||||||
convert Options{outputStyle = PlainStyle} ms = unlines ms
|
convert Options{ outputStyle = PlainStyle } ms = unlines ms
|
||||||
|
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a)
|
withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a)
|
||||||
withGHC body = ghandle ignore $ runGhc (Just libdir) body
|
withGHC body = ghandle ignore $ runGhc (Just libdir) body
|
||||||
|
Loading…
Reference in New Issue
Block a user