From 16591937d99af4a899a28fee211cb2285b771abc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 4 Mar 2019 19:49:59 -0500 Subject: [PATCH] src/Cube.hs: add type annotations to avoid monomorphism warnings. --- src/Cube.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Cube.hs b/src/Cube.hs index c793c1b..df2f8ab 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -59,7 +59,7 @@ instance Arbitrary Cube where -- these numbers don't overflow 64 bits. This number is not -- magic in any other sense than that it does not cause test -- failures, while 2^23 does. - coordmax = 4194304 -- 2^22 + coordmax = 4194304 :: Int -- 2^22 coordmin = -coordmax @@ -138,7 +138,7 @@ center cube = top_face :: Cube -> Face.Face top_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point delta (-delta) delta ) v1' = cc + ( Point delta delta delta ) @@ -151,7 +151,7 @@ top_face cube = Face.Face v0' v1' v2' v3' back_face :: Cube -> Face.Face back_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point delta (-delta) (-delta) ) v1' = cc + ( Point delta delta (-delta) ) @@ -163,7 +163,7 @@ back_face cube = Face.Face v0' v1' v2' v3' down_face :: Cube -> Face.Face down_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point (-delta) (-delta) (-delta) ) v1' = cc + ( Point (-delta) delta (-delta) ) @@ -176,7 +176,7 @@ down_face cube = Face.Face v0' v1' v2' v3' front_face :: Cube -> Face.Face front_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point (-delta) (-delta) delta ) v1' = cc + ( Point (-delta) delta delta ) @@ -187,7 +187,7 @@ front_face cube = Face.Face v0' v1' v2' v3' left_face :: Cube -> Face.Face left_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point delta (-delta) delta ) v1' = cc + ( Point (-delta) (-delta) delta ) @@ -199,7 +199,7 @@ left_face cube = Face.Face v0' v1' v2' v3' right_face :: Cube -> Face.Face right_face cube = Face.Face v0' v1' v2' v3' where - delta = 1/2 + delta = (1/2) :: Double cc = center cube v0' = cc + ( Point (-delta) delta delta) v1' = cc + ( Point delta delta delta ) -- 2.44.2