stripped out frontend
This commit is contained in:
31
app/Main.hs
31
app/Main.hs
@@ -20,36 +20,9 @@ License along with this program. If not, see
|
||||
|
||||
-}
|
||||
|
||||
module Main where
|
||||
|
||||
import Control.Monad.Trans.State as S
|
||||
import System.Console.HCL (Request, reqIO, runRequest)
|
||||
import System.EasyFile
|
||||
( createDirectoryIfMissing
|
||||
, getAppUserDataDirectory
|
||||
, (</>)
|
||||
)
|
||||
import System.Random (getStdGen)
|
||||
|
||||
import Types
|
||||
import UI
|
||||
import Util
|
||||
module Main (main) where
|
||||
|
||||
main :: IO ()
|
||||
main = runRequest setup >>= mapM_ (S.evalStateT mainMenu)
|
||||
|
||||
setup :: Request Status
|
||||
setup = do
|
||||
g <- reqIO getStdGen
|
||||
p <- getDBPath
|
||||
db <- loadFrom p
|
||||
pw <- getMasterPass
|
||||
return $ Status g pw p db
|
||||
|
||||
getDBPath :: Request FilePath
|
||||
getDBPath = reqIO $ do
|
||||
path <- getAppUserDataDirectory "passman"
|
||||
createDirectoryIfMissing True path
|
||||
return $ path </> "database.json"
|
||||
main = return ()
|
||||
|
||||
--jl
|
||||
|
||||
Reference in New Issue
Block a user