[code clean ups, remove obsolete options
John Meacham <john@repetae.net>**20090808131708
 Ignore-this: b140b19f12450e47892c8d1e6cae576
] hunk ./src/E/Lint.hs 133
-    let fn = optOutName options ++ "_" ++ pname ++ ".jhc_core"
+    let fn = outputName ++ "_" ++ pname ++ ".jhc_core"
hunk ./src/Grin/Lint.hs 52
-            let oname = optOutName options ++ "_" ++ pname ++ "." ++ ext
+            let oname = outputName ++ "_" ++ pname ++ "." ++ ext
hunk ./src/Ho/Build.hs 5
-    doDependency,
hunk ./src/Ho/Build.hs 131
-{-# NOINLINE doDependency #-}
-doDependency :: [String] -> IO ()
-doDependency as = do
-    done_ref <- newIORef mempty;
-    let f (Right f) = fetchSource done_ref [f] Nothing >> return ()
-        f (Left m) = resolveDeps done_ref m
-    mapM_ (f . fileOrModule) as
-    sm <- knownSourceMap `fmap` readIORef done_ref
-    mapM_ print $ melems sm
hunk ./src/Ho/Build.hs 418
-            CompLinkUnit cu -> f cu
-            CompTcCollected _ cu -> f cu
-            CompCollected _ cu -> f cu
+            CompLinkUnit cu      -> return $ f cu
+            CompTcCollected _ cu -> return $ f cu
+            CompCollected _ cu   -> return $ f cu
hunk ./src/Ho/Build.hs 422
-            CompTCed (_,_,_,ss) -> return $ Set.fromList ss
-            CompHo {} -> return Set.empty
-            CompDummy -> return Set.empty
-            CompSources sc      -> do
-                return $ Set.fromList (map sourceIdent sc)
+            CompTCed (_,_,_,ss) -> Set.fromList ss
+            CompSources sc      -> Set.fromList (map sourceIdent sc)
+            _                   -> Set.empty
hunk ./src/Ho/Build.hs 431
-    let showProgress ms = printModProgress fmtLen maxModules tickProgress ms
-        fmtLen = ceiling (logBase 10 (fromIntegral maxModules+1) :: Double) :: Int
-        tickProgress = modifyMVar cur $ \val -> return (val+1,val)
hunk ./src/Ho/Build.hs 455
+        showProgress ms = printModProgress fmtLen maxModules tickProgress ms
+        fmtLen = ceiling (logBase 10 (fromIntegral maxModules+1) :: Double) :: Int
+        tickProgress = modifyMVar cur $ \val -> return (val+1,val)
hunk ./src/Main.hs 112
-        DependencyTree  -> doDependency (optArgs o)
hunk ./src/Main.hs 741
-            fn = optOutName options
-        writeFile (fn ++ "_grin.dot") dot
+        writeFile (outputName ++ "_grin.dot") dot
hunk ./src/Main.hs 746
-compileGrinToC grin | optMode options == Interpret = fail "Interpretation currently not supported."
hunk ./src/Main.hs 749
-        fn = optOutName options ++ lup "executable_extension"
+        fn = outputName ++ lup "executable_extension"
hunk ./src/Options.hs 23
+    outputName,
hunk ./src/Options.hs 138
-          | Interpret      -- ^ Interpret.
hunk ./src/Options.hs 141
-          | DependencyTree -- ^ show simple dependency tree
hunk ./src/Options.hs 155
-    optProgArgs    ::  [String],  -- ^ Arguments to pass to the interpreted program.
hunk ./src/Options.hs 160
-    optCC          ::  String,    -- ^ C compiler.
hunk ./src/Options.hs 168
-    optOutName     ::  String,                 -- ^ Name of output file.
+    optOutName     ::  Maybe String,           -- ^ Name of output file.
hunk ./src/Options.hs 173
-    optFollowDeps  :: !Bool,                   -- ^ Don't follow dependencies, all deps must be loaded from packages or specified on the command line.
hunk ./src/Options.hs 175
-    optBatch       :: !Int,                    -- ^ How many modules to attempt in parallel
hunk ./src/Options.hs 191
-    optProgArgs    = [],
hunk ./src/Options.hs 198
-    optCC          = "gcc",
hunk ./src/Options.hs 204
-    optOutName     = "hs.out",
+    optOutName     = Nothing,
hunk ./src/Options.hs 206
-    optFollowDeps  = True,
-    optBatch       = 10,
hunk ./src/Options.hs 226
-    , Option ['o'] ["output"]    (ReqArg (optOutName_s) "FILE")        "output to FILE"
+    , Option ['o'] ["output"]    (ReqArg (optOutName_s . Just) "FILE")        "output to FILE"
hunk ./src/Options.hs 231
---    , Option []    ["progc"]     (ReqArg (\d -> optCC_s d) "gcc")      "c compiler to use"
---    , Option []    ["arg"]       (ReqArg (\d -> optProgArgs_u (++ [d])) "arg") "arguments to pass interpreted program"
hunk ./src/Options.hs 234
- --   , Option []    ["interpret"] (NoArg  (optMode_s Interpret))        "interpret"
hunk ./src/Options.hs 237
---    , Option []    ["batch"]     (ReqArg (optBatch_s . read) "15") "number of modules to compile as a group at once, lower numbers trade speed for memory"
hunk ./src/Options.hs 254
-    , Option []    ["dependency"]  (NoArg  (optMode_s DependencyTree))  "Follow import dependencies only then quit"
-    , Option []    ["no-follow-deps"] (NoArg  (optFollowDeps_s False)) "Don't follow depencies not listed on command line"
hunk ./src/Options.hs 430
+outputName = maybe "hs.out" id (optOutName options)