Re: [GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-10-09 Thread GHC
#4315: Generalize the 'RandomGen' and 'Random' classes
---+
  Reporter:  TomMD |  Owner:  
  Type:  proposal  | Status:  closed  
  Priority:  normal|  Milestone:  Not GHC 
 Component:  libraries/random  |Version:  6.12.3  
Resolution:  wontfix   |   Keywords:  
  Testcase:|  Blockedby:  
Difficulty:| Os:  Unknown/Multiple
  Blocking:|   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---+
Changes (by TomMD):

  * status:  new = closed
  * resolution:  = wontfix


-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4315#comment:4
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-10-09 Thread GHC
#4315: Generalize the 'RandomGen' and 'Random' classes
---+
  Reporter:  TomMD |  Owner:  
  Type:  proposal  | Status:  closed  
  Priority:  normal|  Milestone:  Not GHC 
 Component:  libraries/random  |Version:  6.12.3  
Resolution:  wontfix   |   Keywords:  
  Testcase:|  Blockedby:  
Difficulty:| Os:  Unknown/Multiple
  Blocking:|   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---+

Comment(by TomMD):

 In summary to this proposal, I think the community agrees it is too
 cludgy.  Perhaps people would have agreed on one of SPJs suggested
 designs [1], so I might make another proposal when I again have time.
 I'll mark the associated bug as closed, or whatever seems closest to
 'reject'.

 Cheers,
 Thomas


 [1]
 {{{
  class RandomGen g where
 type GenVal g :: *
 next :: g - (GenVal g, g)

  class Random a v where
randoms :: forall g. (RandomGen g, v ~ GenVal g) = g - [a]
 }}}

 or

 {{{
  class RandomGen g where
nextInt :: g - (Int, g)
nextByteString :: g - (ByteString, g)
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4315#comment:5
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-09-30 Thread GHC
#4315: Generalize the 'RandomGen' and 'Random' classes
-+--
Reporter:  TomMD |Owner:  
Type:  proposal  |   Status:  new 
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 igloo):

  * milestone:  = Not GHC


Old description:

 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.

New description:

 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#comment:3
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-09-14 Thread GHC
#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
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-09-14 Thread GHC
#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
-+--

Comment(by TomMD):

 Note: The attached patch is built on a repo with the patch from bug 4312.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4315#comment:1
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #4315: Generalize the 'RandomGen' and 'Random' classes

2010-09-14 Thread GHC
#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
-+--

Comment(by TomMD):

 Replying to [comment:1 TomMD]:
  Note: The attached patch is built on a repo with the patch from bug
 4312.

 Sorry, I ment the patch from proposal #4314

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4315#comment:2
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs