ghc-mod 0.5.2 → 0.5.3
raw patch · 5 files changed
+22/−9 lines, 5 files
Files
- Browse.hs +10/−2
- GHCMod.hs +9/−5
- Types.hs +1/−0
- elisp/ghc.el +1/−1
- ghc-mod.cabal +1/−1
Browse.hs view
@@ -10,9 +10,17 @@ ---------------------------------------------------------------- browseModule :: Options -> String -> IO String-browseModule opt mdlName = convert opt . validate <$> browse mdlName+browseModule opt mdlName = convert opt . format <$> browse mdlName where- validate = sort . filter (isAlpha.head)+ format+ | operators opt = formatOps+ | otherwise = removeOps+ removeOps = sort . filter (isAlpha.head)+ formatOps = sort . map formatOps'+ formatOps' x@(s:_)+ | isAlpha s = x+ | otherwise = '(' : x ++ ")"+ formatOps' [] = error "formatOps'" browse :: String -> IO [String] browse mdlName = withGHC $ do
GHCMod.hs view
@@ -21,15 +21,15 @@ ---------------------------------------------------------------- usage :: String-usage = "ghc-mod version 0.5.1\n"+usage = "ghc-mod version 0.5.3\n" ++ "Usage:\n"- ++ "\t ghc-mod [-l] list\n"- ++ "\t ghc-mod [-l] lang\n"- ++ "\t ghc-mod [-l] browse <module> [<module> ...]\n"+ ++ "\t ghc-mod list [-l]\n"+ ++ "\t ghc-mod lang [-l]\n"+ ++ "\t ghc-mod browse [-l] [-o] <module> [<module> ...]\n" ++ "\t ghc-mod check <HaskellFile>\n" ++ "\t ghc-mod type <HaskellFile> <module> <expression>\n" ++ "\t ghc-mod info <HaskellFile> <module> <expression>\n"- ++ "\t ghc-mod [-h opt] lint <HaskellFile>\n"+ ++ "\t ghc-mod lint [-h opt] <HaskellFile>\n" ++ "\t ghc-mod boot\n" ++ "\t ghc-mod help\n" @@ -39,6 +39,7 @@ defaultOptions = Options { convert = toPlain , hlintOpts = []+ , operators = False } argspec :: [OptDescr (Options -> Options)]@@ -48,6 +49,9 @@ , Option "h" ["hlintOpt"] (ReqArg (\h opts -> opts { hlintOpts = h : hlintOpts opts }) "hlintOpt") "hint to be ignored"+ , Option "o" ["operators"]+ (NoArg (\opts -> opts { operators = True }))+ "print operators, too" ] parseArgs :: [OptDescr (Options -> Options)] -> [String] -> (Options, [String])
Types.hs view
@@ -11,6 +11,7 @@ data Options = Options { convert :: [String] -> String , hlintOpts :: [String]+ , operators :: Bool } withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a)
elisp/ghc.el view
@@ -16,7 +16,7 @@ ;;; Code: -(defconst ghc-version "0.5.0")+(defconst ghc-version "0.5.3") ;; (eval-when-compile ;; (require 'haskell-mode))
ghc-mod.cabal view
@@ -1,5 +1,5 @@ Name: ghc-mod-Version: 0.5.2+Version: 0.5.3 Author: Kazu Yamamoto <kazu@iij.ad.jp> Maintainer: Kazu Yamamoto <kazu@iij.ad.jp> License: BSD3