#4315: Generalize the 'RandomGen' and 'Random' classes
---------------------------------+------------------------------------------
    Reporter:  TomMD             |       Owner:                  
        Type:  proposal          |      Status:  new             
    Priority:  normal            |   Component:  libraries/random
     Version:  6.12.3            |    Keywords:                  
    Testcase:                    |   Blockedby:                  
          Os:  Unknown/Multiple  |    Blocking:                  
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
---------------------------------+------------------------------------------
 RandomGen and Random classes assume generators produce Int values.  This
 is non-ideal as many high speed generators produce special values (ex:
 doubles) or generic values (bit streams / bytestrings) that can be
 converted directly to my types easier than coercing to Int then to an 'a'
 via the Random class.

 The proposal is to change the classes from/to:

     class RandomGen g where

   -->

     class RandomGen g v | g -> v where

 and

     class Random a where

   -->

     class Random a v where

 And make needed changes to the classes instances that follow from these.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4315>
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

Reply via email to