[project @ 1997-09-03 15:33:15 by simonm]
[ghc-hetmet.git] / ghc / tests / programs / barton-mangler-bug / TypesettingTricks.hs
1 -- The functions in this file are expressly for the purpose of aiding
2 -- the typesetting of some functions with Smugweb.  To this end, in
3 -- some cases I will use named, prefix functions rather than operators
4 -- (since under Smugweb operators cannot accept arguments).  This file
5 -- will define those infix functions.
6
7 module TypesettingTricks where
8
9 realdiv:: Floating a => a -> a -> a
10 realdiv = (/)
11
12 realmul:: Num a => a -> a -> a
13 realmul = (*)
14
15 dotmul:: Num a => a -> a -> a
16 dotmul = (*)
17
18 rand:: Integer -> [ Float ]
19 rand i = r : rand i'
20    where i' = ( (3146757 * i) + 1731) `mod` 4194304
21          r = (fromInteger i') / 4194304.0