From: Michael Orlitzky Date: Tue, 30 Aug 2011 11:34:37 +0000 (-0400) Subject: Fix some more hLint warnings. X-Git-Tag: 0.0.1~200 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=518b4b43bfd6c7c1d09841ca3ff5eeae089351ea;p=spline3.git Fix some more hLint warnings. --- diff --git a/src/Examples.hs b/src/Examples.hs index f90a819..ebdf268 100644 --- a/src/Examples.hs +++ b/src/Examples.hs @@ -28,7 +28,7 @@ n_cube n = (Repa.Z Repa.:. n Repa.:. n Repa.:. n) trilinear :: Values3D trilinear = Repa.fromList (n_cube 3) $ flatten $ - transpose_xz $ + transpose_xz trilinear_list @@ -41,7 +41,7 @@ trilinear_zoom_2_list = [[[1, 3/2, 2, 5/2, 3], [1, 7/4, 5/2, 13/4, 4], [1, 2, 3, trilinear_zoom_2 :: Values3D trilinear_zoom_2 = Repa.fromList (n_cube 6) $ flatten $ - transpose_xz $ + transpose_xz trilinear_zoom_2_list @@ -55,7 +55,7 @@ trilinear9x9x9_list = [[[1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5], [1, 1.75, 2.5, 3.25 trilinear9x9x9 :: Values3D trilinear9x9x9 = Repa.fromList (n_cube 9) $ flatten $ - transpose_xz $ + transpose_xz trilinear9x9x9_list @@ -97,7 +97,7 @@ naturals_list = [ [ [ 0, 1, 2 ], naturals :: Values3D naturals = Repa.fromList (n_cube 3) $ flatten $ - transpose_xz $ + transpose_xz naturals_list diff --git a/src/Main.hs b/src/Main.hs index ef04e1e..c8ba345 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -18,7 +18,7 @@ mri_shape = (Z :. 256 :. 256 :. 1) main :: IO () main = do args <- getArgs - let color = args !! 0 + let color = head args let in_file = "./data/MRbrain.40." ++ color let out_file = "MRbrain.40." ++ color ++ ".out" mridata <- read_values_3d mri_shape in_file diff --git a/src/Misc.hs b/src/Misc.hs index 6b5a84d..090642a 100644 --- a/src/Misc.hs +++ b/src/Misc.hs @@ -46,7 +46,7 @@ transpose_xz m = | z <- [0..zsize]] where zsize = (length m) - 1 - ysize = (length $ head m)- 1 + ysize = length (head m) - 1 xsize = (length $ head $ head m) - 1 -- | Takes a list, and returns True if its elements are pairwise