| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Unison.Codebase.Init
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 -> (Codebase m Symbol Ann -> m r) -> m r
Documentation
Constructors
| Init | |
Fields
| |
An error that occurred while initializing a codebase.
data CodebaseInitOptions Source #
Constructors
| Home CodebasePath | |
| Specified SpecifiedCodebase |
data CodebaseLockOption Source #
data InitResult Source #
Constructors
| OpenedCodebase | |
| CreatedCodebase |
Instances
| Show InitResult Source # | |
Defined in Unison.Codebase.Init Methods showsPrec :: Int -> InitResult -> ShowS # show :: InitResult -> String # showList :: [InitResult] -> ShowS # | |
| Eq InitResult Source # | |
Defined in Unison.Codebase.Init | |
data SpecifiedCodebase Source #
data MigrationStrategy Source #
Constructors
| 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 Methods showsPrec :: Int -> MigrationStrategy -> ShowS # show :: MigrationStrategy -> String # showList :: [MigrationStrategy] -> ShowS # | |
| Eq MigrationStrategy Source # | |
Defined in Unison.Codebase.Init Methods (==) :: MigrationStrategy -> MigrationStrategy -> Bool # (/=) :: MigrationStrategy -> MigrationStrategy -> Bool # | |
| Ord MigrationStrategy Source # | |
Defined in Unison.Codebase.Init Methods 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 Methods showsPrec :: Int -> BackupStrategy -> ShowS # show :: BackupStrategy -> String # showList :: [BackupStrategy] -> ShowS # | |
| Eq BackupStrategy Source # | |
Defined in Unison.Codebase.Init Methods (==) :: BackupStrategy -> BackupStrategy -> Bool # (/=) :: BackupStrategy -> BackupStrategy -> Bool # | |
| Ord BackupStrategy Source # | |
Defined in Unison.Codebase.Init Methods 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 Methods showsPrec :: Int -> VacuumStrategy -> ShowS # show :: VacuumStrategy -> String # showList :: [VacuumStrategy] -> ShowS # | |
| Eq VacuumStrategy Source # | |
Defined in Unison.Codebase.Init Methods (==) :: VacuumStrategy -> VacuumStrategy -> Bool # (/=) :: VacuumStrategy -> VacuumStrategy -> Bool # | |
| Ord VacuumStrategy Source # | |
Defined in Unison.Codebase.Init Methods 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 -> (Codebase m Symbol Ann -> m r) -> m r Source #