ca-store/app/Main.hs
hylodon 68bba7c653 Move all output to a sum type
All errors, warnings, and messages are now listed in a sum type
in 'CAStore.Type.Text'. The added structure should help with
writing better error messages. Also, if and when we get to
localising ca-store, implementation will be trivial.
2025-09-18 16:12:46 +01:00

15 lines
406 B
Haskell

module Main(main) where
import CAStore.Command (runCommand)
import CAStore.Config (finalConfig)
import CAStore.Program (Program, runProgram, getCommand)
import CAStore.Program.IO.Text (err)
import CAStore.Program.Storage (initialise)
main :: IO ()
main = finalConfig >>= flip runProgram defaultProgram
defaultProgram :: Program ()
defaultProgram = do
initialise
getCommand >>= either err runCommand