SystemRandom throwing GenErrorOther #12

Closed
singpolyma opened this Issue Mar 5, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Contributor

singpolyma commented Mar 5, 2013

Trying to gen (maxBound :: Word64) from SystemRandom I get a GenErrorOther with a string message about an inability to generate that many bytes, instead of a RequestedTooManyBytes.

Owner

TomMD commented Mar 5, 2013

Humm, yes that should probably be RequestedTooManyBytes. I'll fix it.

TomMD was assigned Mar 5, 2013

Owner

TomMD commented Mar 8, 2013

Fixed. The function is reseedInfo :: g -> ReseedInfo

data ReseedInfo =
    = InXBytes Word64   -- ^ Generator needs reseeded in X bytes
    | InXCalls Word64   -- ^ Generator needs reseeded in X calls
    | NotSoon           -- ^ The bound is over 2^64 bytes or calls
    | Never             -- ^ This generator never reseeds (ex: 'SystemRandom')
  deriving (Eq, Ord, Show, Read, Typeable)

TomMD closed this Mar 8, 2013

Owner

TomMD commented Mar 8, 2013

Oops, wrong comment for the thread. Still, I fixed the GenErrorOther issue too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment