Proposal: Add Random instances for more base types

Bas van Dijk v.dijk.bas at gmail.com
Sun Oct 24 04:24:25 EDT 2010


On Fri, Oct 8, 2010 at 4:13 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> On Thu, Oct 7, 2010 at 2:27 PM, Ivan Lazar Miljenovic
> <ivan.miljenovic at gmail.com> 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 <igloo at earth.li> 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


More information about the Libraries mailing list