packages feed

functor-combo 0.2.1 → 0.3

raw patch · 2 files changed

+23/−13 lines, 2 files

Files

functor-combo.cabal view
@@ -1,6 +1,6 @@ Name:                functor-combo-Version:             0.2.1-Cabal-Version:       >= 1.2+Version:             0.3+Cabal-Version:       >= 1.6 Synopsis:            Functor combinators with tries & zippers Category:            Data Description:@@ -9,20 +9,15 @@   . Author:              Conal Elliott Maintainer:          conal@conal.net-Homepage:            http://haskell.org/haskellwiki/functor-combo Copyright:           (c) 2010-2012 by Conal Elliott License:             BSD3 License-File:        COPYING Stability:           experimental build-type:          Simple -Package-Url:         http://code.haskell.org/~conal/code/functor-combo--- Wait until Cabal 1.6 is more wide-spread and then add the following--- in place of the Package-Url field and bump Cabal-Version to >= 1.6.--- --- Source-Repository head---     type:         darcs---     location:     http://code.haskell.org/~conal/code/functor-combo+source-repository head+  type:     git+  location: git://github.com/conal/functor-combo.git  Library   hs-Source-Dirs:      src
src/FunctorCombo/StrictMemo.hs view
@@ -18,7 +18,8 @@  module FunctorCombo.StrictMemo   (-    HasTrie(..),(:->:),memo,memo2,memo3+    HasTrie(..),(:->:),memo,memo2,memo3,idTrie+  , onUntrie, onUntrie2   ) where  import Control.Arrow (first)@@ -30,7 +31,7 @@ import qualified Data.IntTrie as IT  -- data-inttrie import Data.Tree -import Control.Compose (result)  -- TypeCompose+import Control.Compose (result,(<~))  -- TypeCompose  -- import FunctorCombo.Strict import FunctorCombo.Functor@@ -48,7 +49,7 @@ type k :->: v = Trie k v  --- #define FunctorSuperClass+#define FunctorSuperClass  #ifdef FunctorSuperClass @@ -451,3 +452,17 @@   type PF (Tree a) = Const a :*: []   unwrap (Node a ts) = Const a :*: ts   wrap (Const a :*: ts) = Node a ts++{--------------------------------------------------------------------+    Acting on function+--------------------------------------------------------------------}++onUntrie :: (HasTrie a, HasTrie b) =>+            ((a  ->  a') -> (b  ->  b'))+         -> ((a :->: a') -> (b :->: b'))+onUntrie = trie <~ untrie++onUntrie2  :: (HasTrie a, HasTrie b, HasTrie c) =>+             ((a  ->  a') -> (b  ->  b') -> (c  ->  c'))+          -> ((a :->: a') -> (b :->: b') -> (c :->: c'))+onUntrie2 = onUntrie <~ untrie