Cleanup compiler warnings
This commit is contained in:
+2
-6
@@ -1,3 +1,4 @@
|
||||
{-# OPTIONS -Wno-incomplete-uni-patterns #-}
|
||||
{- Helpers for random generation. -}
|
||||
module RandomHelp (
|
||||
module System.Random,
|
||||
@@ -29,6 +30,7 @@ takeOneWeighted ws xs = state (randomR (0, sum ws)) >>= (\w -> return (xs !! i w
|
||||
| otherwise = 1 + i (y - z) zs
|
||||
i _ _ = 0
|
||||
|
||||
--{-# OPTIONS -Wno-incomplete-uni-patterns #-}
|
||||
takeOneMore :: RandomGen g => ([a], [a]) -> State g ([a], [a])
|
||||
takeOneMore (_, []) = error "trying to takeOneMore from empty list"
|
||||
takeOneMore (xs, ys) = do
|
||||
@@ -119,9 +121,3 @@ randsSpread (a, b) i
|
||||
|
||||
randsOnCirc :: RandomGen g => Int -> State g [Float]
|
||||
randsOnCirc = randsSpread (0, 2 * pi)
|
||||
|
||||
--randsOnCirc i
|
||||
-- | i <= 0 = error "tried to take <= 0 randsOnCirc"
|
||||
-- | otherwise = zipWith (+) [x,2*x..] <$> replicateM i (state $ randomR (0,x))
|
||||
-- where
|
||||
-- x = 2*pi/fromIntegral i
|
||||
|
||||
Reference in New Issue
Block a user