Proposal: Generalize the RandomGen and Random classes

Bas van Dijk v.dijk.bas at gmail.com
Thu Oct 7 08:18:49 EDT 2010


On Wed, Sep 15, 2010 at 4:33 AM, Antoine Latter <aslatter at gmail.com> wrote:
> How many packages on Hackage provide instances for the Random class?

Around 30 packages.

See the attachment (a grep for "instance Random " on all direct
reverse dependencies of 'random') for details.

Regards,

Bas

P.S.
I'm not sure yet about this proposal.
-------------- next part --------------
find . -type f -print0 | xargs -0 -e grep -nH -e "instance Random "
./ftdi-0.2.0.1/System/FTDI/Properties.hs:94:deriving instance Random α ⇒ Random (BaudRate α)
./happstack-util-0.5.0.2/tests/Happstack/Util/Tests/HostAddress.hs:15:instance Random Word32 where
./hogg-0.4.1/Codec/Container/Ogg/Serial.hs:46:instance Random Serial where
./show-0.3.4/ShowQ.hs:54:instance Random Word8 where
./show-0.3.4/ShowQ.hs:58:instance Random Int64 where
./Combinatorrent-0.3.2/src/TestInstance.hs:20:instance Random Word32 where
./Combinatorrent-0.3.2/src/TestInstance.hs:30:instance Random Word8 where
./hsc3-0.8/Sound/SC3/UGen/UGen.hs:441:instance Random UGen where
./testpack-2.0.1/src/Test/QuickCheck/Instances.hs:46:instance Random Word8 where
./topkata-0.2.3/Labygen.hs:37:instance Random Pos3 where
./HCodecs-0.2/src/Data/Arbitrary.hs:40:instance Random Word8 where
./HCodecs-0.2/src/Data/Arbitrary.hs:44:instance Random Int8 where
./HCodecs-0.2/src/Data/Arbitrary.hs:48:instance Random Word16 where
./HCodecs-0.2/src/Data/Arbitrary.hs:52:instance Random Int16 where
./HCodecs-0.2/src/Data/Arbitrary.hs:56:instance Random Word where
./HCodecs-0.2/src/Data/Arbitrary.hs:60:instance Random Word32 where
./HCodecs-0.2/src/Data/Arbitrary.hs:64:instance Random Int32 where
./HCodecs-0.2/src/Data/Arbitrary.hs:68:instance Random Word64 where
./HCodecs-0.2/src/Data/Arbitrary.hs:72:instance Random Int64 where
./storablevector-0.2.7/tests/QuickCheckUtils.hs:109:instance Random Word8 where
./storablevector-0.2.7/tests/QuickCheckUtils.hs:113:instance Random Int64 where
./vect-0.4.6/src/flt/Base.hs:306:instance Random Normal2 where
./vect-0.4.6/src/flt/Base.hs:310:instance Random Normal3 where
./vect-0.4.6/src/flt/Base.hs:314:instance Random Normal4 where
./vect-0.4.6/src/flt/Base.hs:355:instance Random Ortho2 where
./vect-0.4.6/src/flt/Base.hs:359:instance Random Ortho3 where
./vect-0.4.6/src/flt/Base.hs:363:instance Random Ortho4 where
./vect-0.4.6/src/flt/Base.hs:486:instance Random Vec2 where
./vect-0.4.6/src/flt/Base.hs:588:instance Random Mat2 where
./vect-0.4.6/src/flt/Base.hs:638:instance Random Vec3 where
./vect-0.4.6/src/flt/Base.hs:772:instance Random Mat3 where
./vect-0.4.6/src/flt/Base.hs:824:instance Random Vec4 where
./vect-0.4.6/src/flt/Base.hs:941:instance Random Mat4 where
./vect-0.4.6/Data/Vect/Double/Base.hs:309:instance Random Normal2 where
./vect-0.4.6/Data/Vect/Double/Base.hs:313:instance Random Normal3 where
./vect-0.4.6/Data/Vect/Double/Base.hs:317:instance Random Normal4 where
./vect-0.4.6/Data/Vect/Double/Base.hs:358:instance Random Ortho2 where
./vect-0.4.6/Data/Vect/Double/Base.hs:362:instance Random Ortho3 where
./vect-0.4.6/Data/Vect/Double/Base.hs:366:instance Random Ortho4 where
./vect-0.4.6/Data/Vect/Double/Base.hs:489:instance Random Vec2 where
./vect-0.4.6/Data/Vect/Double/Base.hs:591:instance Random Mat2 where
./vect-0.4.6/Data/Vect/Double/Base.hs:641:instance Random Vec3 where
./vect-0.4.6/Data/Vect/Double/Base.hs:775:instance Random Mat3 where
./vect-0.4.6/Data/Vect/Double/Base.hs:827:instance Random Vec4 where
./vect-0.4.6/Data/Vect/Double/Base.hs:944:instance Random Mat4 where
./vect-0.4.6/Data/Vect/Float/Base.hs:309:instance Random Normal2 where
./vect-0.4.6/Data/Vect/Float/Base.hs:313:instance Random Normal3 where
./vect-0.4.6/Data/Vect/Float/Base.hs:317:instance Random Normal4 where
./vect-0.4.6/Data/Vect/Float/Base.hs:358:instance Random Ortho2 where
./vect-0.4.6/Data/Vect/Float/Base.hs:362:instance Random Ortho3 where
./vect-0.4.6/Data/Vect/Float/Base.hs:366:instance Random Ortho4 where
./vect-0.4.6/Data/Vect/Float/Base.hs:489:instance Random Vec2 where
./vect-0.4.6/Data/Vect/Float/Base.hs:591:instance Random Mat2 where
./vect-0.4.6/Data/Vect/Float/Base.hs:641:instance Random Vec3 where
./vect-0.4.6/Data/Vect/Float/Base.hs:775:instance Random Mat3 where
./vect-0.4.6/Data/Vect/Float/Base.hs:827:instance Random Vec4 where
./vect-0.4.6/Data/Vect/Float/Base.hs:944:instance Random Mat4 where
./flowsim-0.2.7/src/CloneSim.hs:42:instance Random Dir where
./flowsim-0.2.7/src/Statistics.hs:17:instance Random Prob where
./flowsim-0.2.7/src/FlowSim.hs:41:instance Random Dir where
./uuid-1.2.1/Data/UUID/Internal.hs:223:instance Random UUID where
./network-dns-0.1.2/Network/DNS/Client.hs:221:instance Random Word16 where
./combinat-0.2.4/Math/Combinat/Permutations.hs:415:instance Random Permutation where
./combinat-0.2.4/Math/Combinat/Permutations.hs:420:instance Random CyclicPermutation where
./combinat-0.2.4/Math/Combinat/Permutations.hs:426:instance Random DisjointCycles where
./combinat-0.2.4/Math/Combinat/Permutations.hs:433:instance Random SameSize where
./combinat-0.2.4/Math/Combinat/Numbers/Series.hs:316:instance Random Ser where
./combinat-0.2.4/Math/Combinat/Numbers/Series.hs:322:instance Random Exps where
./combinat-0.2.4/Math/Combinat/Numbers/Series.hs:328:instance Random CoeffExps where
./roguestar-engine-0.4.0.2/src/RNG.hs:28:instance Random RNG where
./HaskellTorrent-0.1.1/src/TestInstance.hs:19:instance Random Word32 where
./HaskellTorrent-0.1.1/src/TestInstance.hs:29:instance Random Word8 where
./midi-0.1.5.2/src/Sound/MIDI/Message/Channel/Voice.hs:89:instance Random Pitch where
./midi-0.1.5.2/src/Sound/MIDI/Message/Channel/Voice.hs:97:instance Random Velocity where
./midi-0.1.5.2/src/Sound/MIDI/Message/Channel/Voice.hs:105:instance Random Program where
./midi-0.1.5.2/src/Sound/MIDI/Message/Channel/Voice.hs:113:instance Random Controller where
./midi-0.1.5.2/src/Sound/MIDI/File/Event/Meta.hs:105:instance Random Key where
./midi-0.1.5.2/src/Sound/MIDI/File/Event/Meta.hs:121:instance Random Scale where
./midi-0.1.5.2/src/Sound/MIDI/General.hs:177:instance Random Instrument where
./midi-0.1.5.2/src/Sound/MIDI/General.hs:231:instance Random Drum where
./HAppS-State-0.9.3/src/HAppS/State/Types.hs:29:instance Random Word64 where
./HAppS-State-0.9.3/src/HAppS/State/Types.hs:33:instance Random Int64 where
./yesod-0.5.1/Yesod/Mail.hs:42:instance Random Boundary where
./happstack-state-0.5.0.2/src/Happstack/State/Types.hs:31:instance Random Word64 where
./happstack-state-0.5.0.2/src/Happstack/State/Types.hs:35:instance Random Int64 where
./Fungi-1.0.4/Random.hs:31:instance Random Integer where
./Fungi-1.0.4/Random.hs:34:instance Random Int where
./Fungi-1.0.4/Random.hs:37:instance Random Int8 where
./Fungi-1.0.4/Random.hs:40:instance Random Int16 where
./Fungi-1.0.4/Random.hs:43:instance Random Int32 where
./Fungi-1.0.4/Random.hs:46:instance Random Int64 where
./xmonad-bluetilebranch-0.9.1.4/tests/Properties.hs:1079:instance Random Word8 where
./xmonad-bluetilebranch-0.9.1.4/tests/Properties.hs:1087:instance Random Word64 where
./xsact-1.7.3/Gene.hs:51:instance Random Gene where
./rsagl-0.4.0.2/RSAGL/Types.hs:42:instance Random RSfloat where
./rsagl-0.4.0.2/RSAGL/Types.hs:46:instance Random RSdouble where
./simseq-0.0/src/UnfoldMut.hs:153:instance Random Int64 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:96:instance Random Int8 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:104:instance Random Int16 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:112:instance Random Int32 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:120:instance Random Int64 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:129:instance Random Word8 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:137:instance Random Word16 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:146:instance Random Word32 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:156:instance Random Word64 where
./copilot-0.22/Language/Copilot/Tests/Random.hs:165:instance Random a => Random [a] where
./copilot-0.22/Language/Copilot/Tests/Random.hs:177:instance Random A.Type where
./xmonad-0.9.1/tests/Properties.hs:1079:instance Random Word8 where
./xmonad-0.9.1/tests/Properties.hs:1087:instance Random Word64 where
./feldspar-language-0.3.3/Feldspar/Range.hs:487:instance Random Word32 where
./RSA-1.0.6/Codec/Crypto/RSA.hs:577:instance Random Word8 where


More information about the Libraries mailing list