From 18fe09a531959dcb61d53140152a5770c00466e8 Mon Sep 17 00:00:00 2001 From: Rnhmjoj Date: Sun, 8 Mar 2015 01:34:03 +0100 Subject: [PATCH] Use newtype for Matrix --- Matrix.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Matrix.hs b/Matrix.hs index 1c4983b..febbd0b 100644 --- a/Matrix.hs +++ b/Matrix.hs @@ -1,8 +1,8 @@ module Matrix where import Data.List (intercalate) -data Mat a = Mat [[a]] -type Pos = (Int, Int) +newtype Mat a = Mat [[a]] +type Pos = (Int, Int) instance Functor Mat where fmap f (Mat m) = Mat ((map . map) f m)