Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Init m v a = Init {
- withOpenCodebase :: forall r. DebugName -> CodebasePath -> CodebaseLockOption -> MigrationStrategy -> (Codebase m v a -> m r) -> m (Either OpenCodebaseError r)
- withCreatedCodebase :: forall r. DebugName -> CodebasePath -> CodebaseLockOption -> (Codebase m v a -> m r) -> m (Either CreateCodebaseError r)
- codebasePath :: CodebasePath -> CodebasePath
- type DebugName = String
- data InitError
- data CodebaseInitOptions
- data CodebaseLockOption
- data InitResult
- data SpecifiedCodebase
- data MigrationStrategy
- data BackupStrategy
- data VacuumStrategy
- type Pretty = Pretty ColorText
- createCodebase :: MonadIO m => Init m v a -> DebugName -> CodebasePath -> CodebaseLockOption -> (Codebase m v a -> m r) -> m (Either Pretty r)
- initCodebaseAndExit :: MonadIO m => Init m Symbol Ann -> Verbosity -> DebugName -> Maybe CodebasePath -> CodebaseLockOption -> m ()
- withOpenOrCreateCodebase :: MonadIO m => Init m v a -> DebugName -> CodebaseInitOptions -> CodebaseLockOption -> MigrationStrategy -> ((InitResult, CodebasePath, Codebase m v a) -> m r) -> m (Either (CodebasePath, InitError) r)
- withNewUcmCodebaseOrExit :: MonadIO m => Init m Symbol Ann -> Verbosity -> DebugName -> CodebasePath -> CodebaseLockOption -> (Codebase m Symbol Ann -> m r) -> m r
- withTemporaryUcmCodebase :: MonadUnliftIO m => Init m Symbol Ann -> Verbosity -> DebugName -> CodebaseLockOption -> ((CodebasePath, Codebase m Symbol Ann) -> m r) -> m r
Documentation
Init | |
|
An error that occurred while initializing a codebase.
Instances
data InitResult Source #
Instances
Show InitResult Source # | |
Defined in Unison.Codebase.Init showsPrec :: Int -> InitResult -> ShowS # show :: InitResult -> String # showList :: [InitResult] -> ShowS # | |
Eq InitResult Source # | |
Defined in Unison.Codebase.Init (==) :: InitResult -> InitResult -> Bool # (/=) :: InitResult -> InitResult -> Bool # |
data MigrationStrategy Source #
MigrateAutomatically BackupStrategy VacuumStrategy | Perform a migration immediately if one is required. |
MigrateAfterPrompt BackupStrategy VacuumStrategy | Prompt the user that a migration is about to occur, continue after acknownledgment |
DontMigrate | Triggers an |
Instances
Show MigrationStrategy Source # | |
Defined in Unison.Codebase.Init showsPrec :: Int -> MigrationStrategy -> ShowS # show :: MigrationStrategy -> String # showList :: [MigrationStrategy] -> ShowS # | |
Eq MigrationStrategy Source # | |
Defined in Unison.Codebase.Init (==) :: MigrationStrategy -> MigrationStrategy -> Bool # (/=) :: MigrationStrategy -> MigrationStrategy -> Bool # | |
Ord MigrationStrategy Source # | |
Defined in Unison.Codebase.Init compare :: MigrationStrategy -> MigrationStrategy -> Ordering # (<) :: MigrationStrategy -> MigrationStrategy -> Bool # (<=) :: MigrationStrategy -> MigrationStrategy -> Bool # (>) :: MigrationStrategy -> MigrationStrategy -> Bool # (>=) :: MigrationStrategy -> MigrationStrategy -> Bool # max :: MigrationStrategy -> MigrationStrategy -> MigrationStrategy # min :: MigrationStrategy -> MigrationStrategy -> MigrationStrategy # |
data BackupStrategy Source #
Instances
Show BackupStrategy Source # | |
Defined in Unison.Codebase.Init showsPrec :: Int -> BackupStrategy -> ShowS # show :: BackupStrategy -> String # showList :: [BackupStrategy] -> ShowS # | |
Eq BackupStrategy Source # | |
Defined in Unison.Codebase.Init (==) :: BackupStrategy -> BackupStrategy -> Bool # (/=) :: BackupStrategy -> BackupStrategy -> Bool # | |
Ord BackupStrategy Source # | |
Defined in Unison.Codebase.Init compare :: BackupStrategy -> BackupStrategy -> Ordering # (<) :: BackupStrategy -> BackupStrategy -> Bool # (<=) :: BackupStrategy -> BackupStrategy -> Bool # (>) :: BackupStrategy -> BackupStrategy -> Bool # (>=) :: BackupStrategy -> BackupStrategy -> Bool # max :: BackupStrategy -> BackupStrategy -> BackupStrategy # min :: BackupStrategy -> BackupStrategy -> BackupStrategy # |
data VacuumStrategy Source #
Instances
Show VacuumStrategy Source # | |
Defined in Unison.Codebase.Init showsPrec :: Int -> VacuumStrategy -> ShowS # show :: VacuumStrategy -> String # showList :: [VacuumStrategy] -> ShowS # | |
Eq VacuumStrategy Source # | |
Defined in Unison.Codebase.Init (==) :: VacuumStrategy -> VacuumStrategy -> Bool # (/=) :: VacuumStrategy -> VacuumStrategy -> Bool # | |
Ord VacuumStrategy Source # | |
Defined in Unison.Codebase.Init compare :: VacuumStrategy -> VacuumStrategy -> Ordering # (<) :: VacuumStrategy -> VacuumStrategy -> Bool # (<=) :: VacuumStrategy -> VacuumStrategy -> Bool # (>) :: VacuumStrategy -> VacuumStrategy -> Bool # (>=) :: VacuumStrategy -> VacuumStrategy -> Bool # max :: VacuumStrategy -> VacuumStrategy -> VacuumStrategy # min :: VacuumStrategy -> VacuumStrategy -> VacuumStrategy # |
createCodebase :: MonadIO m => Init m v a -> DebugName -> CodebasePath -> CodebaseLockOption -> (Codebase m v a -> m r) -> m (Either Pretty r) Source #
initCodebaseAndExit :: MonadIO m => Init m Symbol Ann -> Verbosity -> DebugName -> Maybe CodebasePath -> CodebaseLockOption -> m () Source #
try to init a codebase where none exists and then exit regardless (i.e. `ucm --codebase dir init`)
withOpenOrCreateCodebase :: MonadIO m => Init m v a -> DebugName -> CodebaseInitOptions -> CodebaseLockOption -> MigrationStrategy -> ((InitResult, CodebasePath, Codebase m v a) -> m r) -> m (Either (CodebasePath, InitError) r) Source #
withNewUcmCodebaseOrExit :: MonadIO m => Init m Symbol Ann -> Verbosity -> DebugName -> CodebasePath -> CodebaseLockOption -> (Codebase m Symbol Ann -> m r) -> m r Source #
withTemporaryUcmCodebase :: MonadUnliftIO m => Init m Symbol Ann -> Verbosity -> DebugName -> CodebaseLockOption -> ((CodebasePath, Codebase m Symbol Ann) -> m r) -> m r Source #