Cleanup, haddocks

This commit is contained in:
jgk
2021-04-05 11:36:54 +02:00
parent dfee9b2f37
commit 772103f92c
9 changed files with 56 additions and 56 deletions
+4 -2
View File
@@ -5,13 +5,15 @@ import Dodge.RandomHelp
import Geometry
import System.Random
import Control.Monad (replicateM)
import Data.Functor ((<&>))
import Control.Monad.State
import Data.List (zip4)
main :: IO ()
main = do
[ps1, ps2, ps3, ps4] <- mapM randomPoints [500,500,500,500]
fs <- sequence $ replicate 500 (randomRIO (1,20))
fs <- replicateM 500 (randomRIO (1,20))
defaultMain
[ bgroup "circLine tests"
[ bench "circLine" $ nf (map $ uncurry4 circOnLine) (zip4 ps1 ps2 ps3 fs)
@@ -22,4 +24,4 @@ main = do
uncurry4 f (a,b,c,d) = f a b c d
randomPoints :: Int -> IO [Point2]
randomPoints i = getStdGen >>= return . evalState (sequence $ replicate i $ randInCirc 500)
randomPoints i = getStdGen <&> evalState (replicateM i $ randInCirc 500)