Ticket #3352 (closed feature request: fixed)

Opened 4 years ago

Last modified 23 months ago

Data.Word should define instances of Random for each type

Reported by: kaol Owned by: rrnewton
Priority: normal Milestone: _|_
Component: libraries/base Version: 6.10.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm forwarding Debian bug  http://bugs.debian.org/533022 for your consideration.


Data.Word defines signed and unsigned integer types for various bit sizes. It would help if Data.Word made each type an instance of Random. Per  http://www.haskell.org/haskellwiki/Orphan_instance , such an instance should appear either in System.Random or Data.Word, and it makes more sense to do the latter.

Change History

Changed 4 years ago by ross

Data.Word is in the base package and System.Random is in the random package, which depends on base, so the instances would have to go in System.Random.

Changed 4 years ago by igloo

  • difficulty set to Unknown
  • milestone set to _|_

Can someone make a library submission ( http://www.haskell.org/haskellwiki/Library_submissions) for this please?

Changed 2 years ago by rrnewton

  • owner set to rrnewton
  • failure set to None/Unknown

I agree. This should be part of an overhaul of random coming in the near-to-medium term.

Changed 2 years ago by rrnewton

  • status changed from new to merge

Changed 2 years ago by simonmar

  • owner rrnewton deleted
  • status changed from merge to new

Ryan - I don't think you meant to turn this into a merge, right?

Changed 2 years ago by simonmar

  • owner set to rrnewton

Changed 2 years ago by rrnewton

This was fixed in the following commit:

 https://github.com/haskell/random/commit/94f0198568df8372f531dff057719d94233bef94

It's currently fixed in HEAD in the random package repository.

Changed 2 years ago by rrnewton

  • status changed from new to merge

Changed 23 months ago by igloo

  • status changed from merge to closed
  • resolution set to fixed

Pulled

Note: See TracTickets for help on using tickets.