packages feed

Cartesian 0.5.0.0 → 0.6.0.0

raw patch · 4 files changed

+12/−4 lines, 4 filesdep ~lens

Dependency ranges changed: lens

Files

Cartesian.cabal view
@@ -10,7 +10,7 @@ -- PVP summary:      +-+------- breaking API changes
 --                   | | +----- non-breaking API additions
 --                   | | | +--- code changes with no API change
-version:             0.5.0.0
+version:             0.6.0.0
 
 -- A short (one-line) description of the package.
 synopsis:            Coordinate systems
@@ -71,7 +71,7 @@                        
   -- Other library packages from which modules are imported.
   build-depends:       base == 4.*,
-                       lens <= 4.13.0.0,
+                       lens <= 4.14,
                        linear,
                        template-haskell
 
src/Cartesian/Internal/Lenses.hs view
@@ -204,5 +204,7 @@ 
 --------------------------------------------------------------------------------------------------------------------------------------------
 
+-- |
+-- TODO: This should probably yield a vector (rename or redesign)
 centre :: (Applicative v, Fractional f) => Simple Lens (BoundingBox (v f)) (Axes v f)
 centre = pinned (pure $ 1/2)
src/Cartesian/Internal/Types.hs view
@@ -119,6 +119,8 @@ -- Instances -----------------------------------------------------------------------------------------------------------------------------------------
 
 
+-- TODO: Generate these instances with TemplateHaskell (?)
+
 instance HasX (V1 f) f where
   x = lens (\(V1 x') -> x') (\_ x' -> V1 x')
 
src/Cartesian/Lenses.hs view
@@ -30,14 +30,18 @@ module Cartesian.Lenses (
   pinnedAxis, pinned,
   axis, axes, extents, side,
+  corner, size,
   begin, end,
-  width, height, depth, 
+  width, height, depth,
   left, right, bottom, top, front, back,
-  centre) where
+  centre,
+  x, y, z
+) where
 
 
 
 --------------------------------------------------------------------------------------------------------------------------------------------
 -- We'll need these
 --------------------------------------------------------------------------------------------------------------------------------------------
+import Cartesian.Internal.Types
 import Cartesian.Internal.Lenses