Fix pseudonym generation
This commit is contained in:
parent
788b53946a
commit
4266683b15
@ -547,8 +547,8 @@ instance PersistFieldSql Pseudonym where
|
||||
sqlType _ = SqlInt32
|
||||
|
||||
instance Random Pseudonym where
|
||||
randomR (lo, hi) gen = over _1 (fromIntegral :: Word32 -> Pseudonym) $ randomR (min 0 $ fromIntegral lo, max 0b111111111111 $ fromIntegral hi) gen
|
||||
random = randomR (0, 0b111111111111)
|
||||
randomR (max minBound -> lo, min maxBound -> hi) gen = over _1 (fromIntegral :: Word32 -> Pseudonym) $ randomR (fromIntegral lo, fromIntegral hi) gen
|
||||
random = randomR (minBound, maxBound)
|
||||
|
||||
pseudonymWordlist :: [CI Text]
|
||||
pseudonymWordlist = $(wordlist "config/wordlist.txt")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user