From 83718e0646264c79597d0088c8b121b368b40c68 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Wed, 9 Sep 2015 22:09:48 +0900 Subject: [PATCH] Add a FIXME about the Banach laws. The Banach laws are not being tested because they don't hold for Float and Double types. This commit adds a FIXME note so we don't forget to eventually add support for them. --- src/SubHask/Algebra.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/SubHask/Algebra.hs b/src/SubHask/Algebra.hs index 0b97773..a57892d 100644 --- a/src/SubHask/Algebra.hs +++ b/src/SubHask/Algebra.hs @@ -2118,6 +2118,12 @@ class (VectorSpace v, Normed v, Metric v) => Banach v where normalize :: v -> v normalize v = v ./ size v +-- | These laws corresponds to the actual math class, but they don't +-- actually hold for 'Float' and 'Double'. +-- +-- FIXME: +-- Find a way to actually test these laws and add them to +-- "SubHask.TemplateHaskell.Test". law_Banach_distance :: Banach v => v -> v -> Logic (Scalar v) law_Banach_distance v1 v2 = size (v1 - v2) == distance v1 v2