packages feed

provenience 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+11/−6 lines, 3 filesdep ~fglPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: fgl

API changes (from Hackage documentation)

Files

example/euclidean.hs view
@@ -42,8 +42,6 @@     else do         i <- lift get -- which step is this?         lift (put (i+1))-        desc1 <- descX x y-        desc2 <- descY x y         xi <- (func updateX =<< (descX x y)) <%> x <%> y         yi <- (func updateY =<< (descY x y)) <%> x <%> y         xi `named` ("x"++(show i))
provenience.cabal view
@@ -1,5 +1,5 @@ name:                provenience-version:             0.1.0.1+version:             0.1.0.2 synopsis:            Computations that automatically track data dependencies description:         see README.md license:             GPL-3@@ -22,7 +22,7 @@ -- tested against stackage lts-6.35 up to lts-14.22   build-depends:       base >= 4.7 && < 5                      , mtl >= 2.2.1 && <= 2.2.2-                     , fgl >= 5.5.3.1 && <= 5.7.0.1+                     , fgl >= 5.5.3.1 && <= 5.7.0.2                      , pandoc >= 1.16 && <= 2.7.3                      , blaze-markup >= 0.7.1.1 && <= 0.8.2.3                      , aeson >= 0.11.3.0 && <= 1.4.6.0
src/Control/Provenience.hs view
@@ -131,7 +131,7 @@     }
 -- | Variables are internally numbered by 'Node' = 'Int' 
 -- and have an alternative value 'Representation' @alt@. 
--- Futher each variable has a Pandoc 'description' (set by '<?') 
+-- Further each variable has a Pandoc 'description' (set by '<?') 
 -- and optionally a 'shortname' set by 'named' which is a 'String' 
 -- to be used in hyperlinks. 
 data VariableStore alt = VariableStore {
@@ -156,7 +156,8 @@ -- | Every 'Variable' has an 'identifier' in the data flow graph. 
 data Variable a = Variable {
     identifier :: Node,
-    value :: a}
+    value :: a -- ^ dereference
+    }
 instance Functor Variable where
     fmap f x = x {value = f (value x)}
 instance Show a => Show (Variable a) where
@@ -168,6 +169,12 @@ 
 -- | A 'Monad' transformer that keeps track of data dependencies
 type ProvenienceT alt m a = StateT (VariableStore alt) m (Variable a)
+-- TODO: This does not parallelize well. Use Parallel-Arrow-Multicore
+-- to define an arrow isomorphic to 
+-- (a -> b, a -> VariableStore alt -> VariableStore alt)
+-- so that the pure computation can be parallelized.
+
+
 -- | @'Provenience' = 'ProvenienceT' () 'Identity'@
 type Provenience a = State (VariableStore ()) (Variable a)
 -- | Action on the 'VariableStore'