Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add a definition for options.

zoom-cache-gnuplot now accepts options from the list of options (currently empty).
  • Loading branch information...
commit 192c205557892efb22100508558fefb2b2b63edd 1 parent a092da2
Alex Lang authored

Showing 1 changed file with 9 additions and 1 deletion. Show diff stats Hide diff stats

  1. +9 1 tools/zoom-cache-gnuplot.hs
10 tools/zoom-cache-gnuplot.hs
@@ -43,8 +43,16 @@ parseCustom s =
43 43 Custom s1 [s2]
44 44 where (s1, s2) = break (=='=') s
45 45
  46 +options :: [OptDescr (Options -> Options)]
  47 +options =
  48 + []
  49 +
46 50 parseOpts :: [String] -> IO (Options, [String])
47   -parseOpts s = return (defaultOptions, s)
  51 +parseOpts argv =
  52 + case getOpt Permute options argv of
  53 + (o, n, []) -> return (foldl (flip id) defaultOptions o, n)
  54 + (_, _, errs) -> ioError (userError (concat errs ++ usageInfo header options))
  55 + where header = "Usage: zoom-cache-gnuplot ..."
48 56
49 57 main :: IO ()
50 58 main = do

0 comments on commit 192c205

Please sign in to comment.
Something went wrong with that request. Please try again.