Skip to content

Commit

Permalink
Add a FIXME about the Banach laws.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cdepillabout committed Sep 9, 2015
1 parent 407b9aa commit 83718e0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SubHask/Algebra.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 83718e0

Please sign in to comment.