#4314: Move 'split' from the 'RandomGen' class to a new 'SplittableGen' class
---------------------------------+------------------------------------------
Reporter: TomMD | Owner:
Type: proposal | Status: patch
Priority: normal | Milestone: Not GHC
Component: libraries/random | Version: 6.12.3
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by TomMD):
* status: new => patch
Comment:
The new attachment (SplittableGenClass.patch - sorry, should have replaced
the old) seems to be the consensus on the ML. It implements:
{{{
class RandomGen g where
next :: g -> (Int, g)
genRange :: g -> (Int,Int)
genRange _ = (minBound, maxBound)
class (RandomGen g) => SplittableGen g where
split :: g -> (g, g)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4314#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs