Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Util.Seed

Description

Seed class to hash Frames into the random seed. This is like Hashable, except that it must be stable (so hashable isn't suitable), and since it's for a random seed, doesn't care about being well-distributed. So I use the addition algorithm, which has been stable for a while.

Documentation

class Seed a where Source #

Methods

to_seed :: Int -> a -> Int Source #

Instances

Instances details
Seed Word.Word32 Source # 
Instance details

Defined in Util.Seed

Methods

to_seed :: Int -> Word.Word32 -> Int Source #

Seed Word.Word64 Source # 
Instance details

Defined in Util.Seed

Methods

to_seed :: Int -> Word.Word64 -> Int Source #

Seed Frame Source # 
Instance details

Defined in Derive.Stack

Methods

to_seed :: Int -> Frame -> Int Source #

Seed BlockId Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> BlockId -> Int Source #

Seed Id Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> Id -> Int Source #

Seed Namespace Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> Namespace -> Int Source #

Seed TrackId Source # 
Instance details

Defined in Ui.Id

Methods

to_seed :: Int -> TrackId -> Int Source #

Seed ScoreTime Source # 
Instance details

Defined in Ui.ScoreTime

Methods

to_seed :: Int -> ScoreTime -> Int Source #

Seed Text Source # 
Instance details

Defined in Util.Seed

Methods

to_seed :: Int -> Text -> Int Source #

Seed Double Source # 
Instance details

Defined in Util.Seed

Methods

to_seed :: Int -> Double -> Int Source #

Seed Int Source # 
Instance details

Defined in Util.Seed

Methods

to_seed :: Int -> Int -> Int Source #

(&) :: Seed a => Int -> a -> Int infixl 1 Source #