Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Ui.Transform

Description

Functions for larger scale transformations on a State.

Synopsis

Documentation

tracks :: Ui.M m => Id.BlockId -> (Block.TracklikeId -> Block.TracklikeId) -> m () Source #

Transform TracklikeIds.

map IDs

map_state_ids :: (Id.Id -> Id.Id) -> Ui.State -> Either Ui.Error Ui.State Source #

Map a function across the IDs in the given state. Any collisions are thrown in Left.

map_ids :: Ui.M m => (Id.Id -> Id.Id) -> m () Source #

Transform IDs, but don't update view_id pointer map. So only use this when you are sure there are no visible views ("invisible" views occur after they are created but before the sync). This should probably only be used by map_state_ids.

map_view_ids :: Ui.M m => (Id.Id -> Id.Id) -> m () Source #

map_block_ids :: Ui.M m => (Id.Id -> Id.Id) -> m () Source #

Rename a BlockId. Views are updated to point to the new block.

map_track_ids :: Ui.M m => (Id.Id -> Id.Id) -> m () Source #

map_ruler_ids :: Ui.M m => (Id.Id -> Id.Id) -> m () Source #

safe_map_keys :: (Ui.M m, Ord k, Show k) => String -> (k -> k) -> Map k v -> m (Map k v) Source #

namespace

destroy_namespace :: Ui.M m => Id.Namespace -> m () Source #

Destroy all views, blocks, tracks, and rulers with the given namespace.

replace_namespace :: Id.Namespace -> Ui.State -> Ui.State -> Ui.State Source #

Replace the namespace of the second state with the one from the first state.

merge

merge_states :: Ui.State -> Ui.State -> Either Ui.Error Ui.State Source #

Merge ID maps from the states together. Collisions will throw. The Config comes from the first state.

safe_union :: (Ui.M m, Ord k, Show k) => String -> Map k a -> Map k a -> m (Map k a) Source #

intern

intern_text :: Ui.State -> (Ui.State, Map Text Int) Source #

Increase sharing in event text with an intern table.

stats

data Stats Source #

Constructors

Stats 

Fields

Instances

Instances details
Show Stats Source # 
Instance details

Defined in Ui.Transform

Methods

showsPrec :: Int -> Stats -> ShowS #

show :: Stats -> String #

showList :: [Stats] -> ShowS #