From: Michael Orlitzky Date: Tue, 5 Mar 2019 00:49:59 +0000 (-0500) Subject: src/Cube.hs: add type annotations to avoid monomorphism warnings. X-Git-Tag: 1.0.1~47 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=16591937d99af4a899a28fee211cb2285b771abc;p=spline3.git src/Cube.hs: add type annotations to avoid monomorphism warnings. --- 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 )