Proposal: Add Random instances for more base types

On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
I see several instances for base types - the random package ought to provide these.
Proposal: Add Random instances for: * all the types in Data.Int: (Int is already provided) Int8, Int16, Int32, Int64 * all the types in Data.Word: Word, Word8, Word16, Word32, Word64 * almost all the types in Foreign.C.Types: CChar, CSChar, CUChar, CShort, CUShort, CInt, CUInt, CLong, CULong, CPtrdiff, CSize, CWchar, CSigAtomic, CLLong, CULLong, CIntPtr, CUIntPtr, CIntMax, CUIntMax, CFloat, CDouble Does it make sense to have Random instances for CClock and CTime? The patch is attached to the ticket: http://hackage.haskell.org/trac/ghc/ticket/4379 Deadline: 2 weeks (Friday 22 October 2010) Regards, Bas

On Fri, 8 Oct 2010, Bas van Dijk wrote:
On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
wrote: A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
wrote: I see several instances for base types - the random package ought to provide these.
Proposal:
Add Random instances for:
How about Random instances for tuples?

Hi, +1 Milan
On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
wrote: A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
wrote: I see several instances for base types - the random package ought to provide these.
Proposal:
Add Random instances for:
* all the types in Data.Int: (Int is already provided) Int8, Int16, Int32, Int64
* all the types in Data.Word: Word, Word8, Word16, Word32, Word64
* almost all the types in Foreign.C.Types: CChar, CSChar, CUChar, CShort, CUShort, CInt, CUInt, CLong, CULong, CPtrdiff, CSize, CWchar, CSigAtomic, CLLong, CULLong, CIntPtr, CUIntPtr, CIntMax, CUIntMax,
CFloat, CDouble
Does it make sense to have Random instances for CClock and CTime?
The patch is attached to the ticket:
http://hackage.haskell.org/trac/ghc/ticket/4379
Deadline: 2 weeks (Friday 22 October 2010)
Regards,
Bas _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Fri, 8 Oct 2010 16:13:22 +0200, Bas van Dijk
On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
wrote: A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
wrote: I see several instances for base types - the random package ought to provide these.
Proposal:
Add Random instances for: [...]
+1 -- Nicolas Pouillard http://nicolaspouillard.fr

On 9 October 2010 04:08, Nicolas Pouillard
On Fri, 8 Oct 2010 16:13:22 +0200, Bas van Dijk
wrote: On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
wrote: A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
wrote: I see several instances for base types - the random package ought to provide these.
Proposal:
Add Random instances for: [...]
+1
+1 -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

On Fri, Oct 8, 2010 at 4:13 PM, Bas van Dijk
On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
wrote: A lot of those can be removed if Random has instances for Word* by default. Is there any reason they aren't already instances?
On Thu, Oct 7, 2010 at 2:28 PM, Ian Lynagh
wrote: I see several instances for base types - the random package ought to provide these.
Proposal:
Add Random instances for:
* all the types in Data.Int: (Int is already provided) Int8, Int16, Int32, Int64
* all the types in Data.Word: Word, Word8, Word16, Word32, Word64
* almost all the types in Foreign.C.Types: CChar, CSChar, CUChar, CShort, CUShort, CInt, CUInt, CLong, CULong, CPtrdiff, CSize, CWchar, CSigAtomic, CLLong, CULLong, CIntPtr, CUIntPtr, CIntMax, CUIntMax,
CFloat, CDouble
Does it make sense to have Random instances for CClock and CTime?
The patch is attached to the ticket:
http://hackage.haskell.org/trac/ghc/ticket/4379
Deadline: 2 weeks (Friday 22 October 2010)
Regards,
Bas
The deadline for this proposal has passed. There were no objections. I will move the ticket status to 'patch'. Thanks, Bas
participants (5)
-
Bas van Dijk
-
Henning Thielemann
-
Ivan Lazar Miljenovic
-
Milan Straka
-
Nicolas Pouillard