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