{- | Main entry point for the program. -}
main = niceSocketsDo $          -- Prepare things for sockets
    do setCurrentDirectory baseDir -- chdir to the working dir
       l <- newLock             -- Global lock for db updates
       initdb                   -- Initialize the database and get a conn
       gasupply <- newMVar Map.empty -- Global MVar for current status
       runScan gasupply l       -- main scanner

{- | Set up all the threads and get them going. -}
main = niceSocketsDo $          -- Prepare things for sockets
    do setCurrentDirectory baseDir -- chdir to the working dir
       l <- newLock             -- Global lock for db updates
       initdb                   -- Initialize the database and get a conn
       gasupply <- newMVar Map.empty -- Global MVar for current status
       runScan gasupply l       -- main scanner

{- | Set up all the threads and get them going. -}
main = niceSocketsDo $          -- Prepare things for sockets
    do setCurrentDirectory baseDir -- chdir to the working dir
       l <- newLock             -- Global lock for db updates
       initdb                   -- Initialize the database and get a conn
       gasupply <- newMVar Map.empty -- Global MVar for current status
       runScan gasupply l       -- main scanner

{- | Set up all the threads and get them going. -}