-- Copyright 2021 Evan Laforge
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or http://www.gnu.org/licenses/gpl-3.0.txt

module Synth.ImGcMain where
import qualified Streaming.Prelude as S
import qualified System.Environment as Environment

import qualified Synth.ImGc as ImGc

import           Global


-- | I can't have a module be both importable but also be a main.  I have to
-- compile with -main-is, which makes main unqualified.  So I'd have to compile
-- it twice but Shake.Shakefile isn't set up for that.
main :: IO ()
main :: IO ()
main = do
    [String]
dirs <- IO [String]
Environment.getArgs
    forall (m :: * -> *) a x r.
Monad m =>
(a -> m x) -> Stream (Of a) m r -> m r
S.mapM_ (forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ String -> IO ()
putStrLn) forall a b. (a -> b) -> a -> b
$ forall b a. Monoid b => (a -> b) -> [a] -> b
mconcatMap String -> Stream (Of (Set String)) IO ()
ImGc.find [String]
dirs