Skip to content

Switch to using Data.Vector.Strict with VMap #5551

@teodanciu

Description

@teodanciu

Currently, Data.Vector (Vector) is used for boxed storage in VMap, for example in Snapshots:

data SnapShot = SnapShot
  {  
   ...
  , ssDelegations :: VMap VB VB (Credential Staking) (KeyHash StakePool)
  , ssPoolParams :: VMap VB VB (KeyHash StakePool) StakePoolParams 
  , ssStakePoolsSnapShot :: !(VMap VB VB (KeyHash StakePool) StakePoolSnapShot)
}

Once we switch to vector-0.13.2.0 , we can use Data.Vector.Strict wherever we want to make sure there are no thunks.

The NoThunks instance for Data.Vector.Strict has already been implemented in this PR: #5545.

With the switch, we should also implement the now commented out functions: mapValsKVVector and mapWithKeyKVVector in Data.VMap.KVVector and then switch to them in the respective function map and mapWithKey in the Data.VMap module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    💳 technical-debtIssues related to technical debt we introduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions