]> gitweb.michael.orlitzky.com - numerical-analysis.git/commitdiff
Require Vector instances to be instances of Num as well.
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 17 Oct 2012 16:40:38 +0000 (12:40 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 17 Oct 2012 16:40:38 +0000 (12:40 -0400)
src/Vector.hs

index e608a509c505a35f1294618f5d83924a57d0ec30..97bb5d8aea2c94a8100ed981bff988d6a9df60ab 100644 (file)
@@ -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.