From: Michael Orlitzky Date: Wed, 17 Oct 2012 16:40:38 +0000 (-0400) Subject: Require Vector instances to be instances of Num as well. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=d3b5d9259dd9f0650d51447d7f57ed6d782dfdeb;p=numerical-analysis.git Require Vector instances to be instances of Num as well. --- diff --git a/src/Vector.hs b/src/Vector.hs index e608a50..97bb5d8 100644 --- a/src/Vector.hs +++ b/src/Vector.hs @@ -7,7 +7,7 @@ where import Data.Number.BigFloat -class Vector a where +class (Num a) => Vector a where norm :: RealFrac b => a -> b -- Define instances for common numeric types.