summaryrefslogtreecommitdiff
path: root/progs/lib/cl/random.hs
blob: 93d26e4902cfe4ee43e2a9b7d211ee91e50963a1 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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