X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCommandLine.hs;h=687a1c41586f8e71236b00f7c3fe076a7ab2621e;hb=18ebdb6568a5d5a1b6b408a9b596e758f07596b1;hp=f413e2fb214b98840795c8c5201b8d18df517104;hpb=02df1d5763a5d2bfe750bbc30b5c001ee9b23b17;p=spline3.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index f413e2f..687a1c4 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -4,19 +4,18 @@ module CommandLine ( Args(..), apply_args, program_name, - show_help) + show_help ) where -- Get the version from Cabal. -import Paths_spline3 (version) -import Data.Version (showVersion) +import Paths_spline3 ( version ) +import Data.Version ( showVersion ) -import Data.String.Utils (startswith) +import Data.String.Utils ( startswith ) import System.Console.CmdArgs ( CmdArgs, Data, Mode, - Typeable, (&=), argPos, cmdArgsApply, @@ -29,15 +28,14 @@ import System.Console.CmdArgs ( program, typ, summary, - versionArg - ) + versionArg ) -import System.Console.CmdArgs.Explicit (process) -import System.Environment (getArgs, withArgs) -import System.Exit (ExitCode(..), exitWith) -import System.IO (hPutStrLn, stderr) +import System.Console.CmdArgs.Explicit ( process ) +import System.Environment ( getArgs, withArgs ) +import System.Exit ( ExitCode(..), exitWith ) +import System.IO ( hPutStrLn, stderr ) -import ExitCodes +import ExitCodes ( exit_arg_parse_failed ) @@ -51,7 +49,7 @@ data Args = slice :: Maybe Int, upper_threshold :: Int, width :: Int } - deriving (Show, Data, Typeable) + deriving (Show, Data) description :: String description = @@ -145,8 +143,8 @@ arg_spec = -- Infix notation won't work, the arguments are backwards! is_missing_arg_error :: String -> Bool -is_missing_arg_error s = - startswith "Requires at least" s +is_missing_arg_error = + startswith "Requires at least" show_help :: IO Args