aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2019-01-22 11:29:25 +0000
committerYann Herklotz <ymherklotz@gmail.com>2019-01-22 11:29:25 +0000
commit125388a9fa696e354961545887f07633f06b3107 (patch)
treea06b0907971d5be607a77eead779f6a32b0c0a5b
parent77998439ac7d73a86de1cea414809ee1cac71a2a (diff)
downloadverismith-125388a9fa696e354961545887f07633f06b3107.tar.gz
verismith-125388a9fa696e354961545887f07633f06b3107.zip
Make where clause nicer
-rw-r--r--src/VeriFuzz/Graph/Random.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/VeriFuzz/Graph/Random.hs b/src/VeriFuzz/Graph/Random.hs
index 4b72b95..f5a8d6f 100644
--- a/src/VeriFuzz/Graph/Random.hs
+++ b/src/VeriFuzz/Graph/Random.hs
@@ -20,7 +20,8 @@ import Test.QuickCheck (Arbitrary, Gen)
import qualified Test.QuickCheck as QC
dupFolder :: (Eq a, Eq b) => Context a b -> [Context a b] -> [Context a b]
-dupFolder cont ns = unique cont : ns where unique (a, b, c, d) = (nub a, b, c, nub d)
+dupFolder cont ns = unique cont : ns
+ where unique (a, b, c, d) = (nub a, b, c, nub d)
-- | Remove duplicates.
rDups :: (Eq a, Eq b) => Gr a b -> Gr a b
@@ -34,7 +35,8 @@ arbitraryEdge n = do
y <- with $ \a -> x < a && a < n && a > 0
z <- QC.arbitrary
return (x, y, z)
- where with = QC.suchThat $ QC.resize n QC.arbitrary
+ where
+ with = QC.suchThat $ QC.resize n QC.arbitrary
-- | Gen instance for a random acyclic DAG.
randomDAG :: (Arbitrary l, Arbitrary e, Eq l, Eq e) => Gen (Gr l e) -- ^ The generated graph. It uses Arbitrary to