diff options
author | Yale AI Dept <ai@nebula.cs.yale.edu> | 1993-07-14 13:08:00 -0500 |
---|---|---|
committer | Duncan McGreggor <duncan.mcgreggor@rackspace.com> | 1993-07-14 13:08:00 -0500 |
commit | 4e987026148fe65c323afbc93cd560c07bf06b3f (patch) | |
tree | 26ae54177389edcbe453d25a00c38c2774e8b7d4 /progs/lib/cl/random.hs |
Import to github.
Diffstat (limited to 'progs/lib/cl/random.hs')
-rw-r--r-- | progs/lib/cl/random.hs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/progs/lib/cl/random.hs b/progs/lib/cl/random.hs new file mode 100644 index 0000000..93d26e4 --- /dev/null +++ b/progs/lib/cl/random.hs @@ -0,0 +1,21 @@ +-- random.hs -- random number functions +-- +-- author : Sandra Loosemore +-- date : 22 June 1993 +-- + +module Random where + +import RandomPrims -- from random-prims.hi + +class RandomOperand a where + random :: a -> IO a + +instance RandomOperand Int where + random = randomInt +instance RandomOperand Integer where + random = randomInteger +instance RandomOperand Float where + random = randomFloat +instance RandomOperand Double where + random = randomDouble |