Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

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 Double # 
Instance details

Defined in Util.Seed

Methods

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

Seed Int # 
Instance details

Defined in Util.Seed

Methods

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

Seed Word.Word32 # 
Instance details

Defined in Util.Seed

Methods

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

Seed Word.Word64 # 
Instance details

Defined in Util.Seed

Methods

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

Seed Text # 
Instance details

Defined in Util.Seed

Methods

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

Seed TrackId # 
Instance details

Defined in Ui.Id

Methods

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

Seed BlockId # 
Instance details

Defined in Ui.Id

Methods

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

Seed Namespace # 
Instance details

Defined in Ui.Id

Methods

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

Seed Id # 
Instance details

Defined in Ui.Id

Methods

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

Seed ScoreTime # 
Instance details

Defined in Ui.ScoreTime

Methods

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

Seed Frame # 
Instance details

Defined in Derive.Stack

Methods

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

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