]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Misc.hs
src/Misc.hs: add a type signature to eliminate polymorphism.
[spline3.git] / src / Misc.hs
index e6cd07ea987cbfb38a621b2b10c6afe6f3d329e6..56d33eb43c3969ce0c9c40b5efb81582d0b888b1 100644 (file)
@@ -35,6 +35,7 @@ factorial :: Int -> Int
 factorial !n =
   go 1 n
   where
+    go :: Int -> Int -> Int
     go !acc !i
       | i <= 1    = acc
       | otherwise = go (acc * i) (i - 1)
@@ -110,7 +111,7 @@ test_flatten1 =
     assertEqual "flatten actually works" expected_list actual_list
     where
       target = [[[1::Int]], [[2, 3]]]
-      expected_list = [1, 2, 3]
+      expected_list = [1, 2, 3] :: [Int]
       actual_list = flatten target