kure 2.14.4 → 2.14.6
raw patch · 2 files changed
+27/−14 lines, 2 files
Files
- Language/KURE/Path.hs +12/−0
- kure.cabal +15/−14
Language/KURE/Path.hs view
@@ -26,6 +26,7 @@ , ExtendPath(..) , snocPathToPath , pathToSnocPath+ , singletonSnocPath , lastCrumb -- ** Absolute and Local Paths , LocalPath@@ -58,10 +59,17 @@ instance Monoid (SnocPath crumb) where mempty :: SnocPath crumb mempty = SnocPath []+ {-# INLINE mempty #-} mappend :: SnocPath crumb -> SnocPath crumb -> SnocPath crumb mappend (SnocPath p1) (SnocPath p2) = SnocPath (p2 ++ p1)+ {-# INLINE mappend #-} +instance Functor SnocPath where+ fmap :: (a -> b) -> SnocPath a -> SnocPath b+ fmap f (SnocPath p) = SnocPath (map f p)+ {-# INLINE fmap #-}+ -- | Convert a 'Path' to a 'SnocPath'. O(n). pathToSnocPath :: Path crumb -> SnocPath crumb pathToSnocPath p = SnocPath (reverse p)@@ -76,6 +84,10 @@ show :: SnocPath crumb -> String show = show . snocPathToPath {-# INLINE show #-}++singletonSnocPath :: crumb -> SnocPath crumb+singletonSnocPath cr = SnocPath [cr]+{-# INLINE singletonSnocPath #-} -- | Get the last crumb from a 'SnocPath'. O(1). lastCrumb :: SnocPath crumb -> Maybe crumb
kure.cabal view
@@ -1,5 +1,5 @@ Name: kure-Version: 2.14.4+Version: 2.14.6 Synopsis: Combinators for Strategic Programming Description: The Kansas University Rewrite Engine (KURE) is a domain-specific language for strategic rewriting. KURE was inspired by Stratego and StrategyLib, and has similarities with Scrap Your Boilerplate and Uniplate.@@ -11,19 +11,19 @@ . You can read about KURE in the following article: .- The Kansas University Rewrite Engine: A Haskell-Embedded Strategic Programming Language with Custom Closed Universes. Neil Sculthorpe, Nicolas Frisby and Andy Gill. 2013.- <http://www.ittc.ku.edu/~neil/papers_and_talks/kure.pdf>+ The Kansas University Rewrite Engine: A Haskell-Embedded Strategic Programming Language with Custom Closed Universes. Neil Sculthorpe, Nicolas Frisby and Andy Gill. 2014.+ <http://www.cs.swan.ac.uk/~csnas/papers_and_talks/kure.pdf> Category: Language License: BSD3 License-file: LICENSE Author: Neil Sculthorpe and Andy Gill-Maintainer: Neil Sculthorpe <neil@ittc.ku.edu>-Copyright: (c) 2006--2013 The University of Kansas+Maintainer: Neil Sculthorpe <N.A.Sculthorpe@swansea.ac.uk>+Copyright: (c) 2006--2014 The University of Kansas Homepage: http://www.ittc.ku.edu/csdl/fpg/software/kure.html Stability: beta build-type: Simple-Cabal-Version: >= 1.6+Cabal-Version: >= 1.10 Extra-Source-Files: examples/Examples.hs examples/Fib/AST.hs@@ -40,10 +40,12 @@ examples/Expr/Examples.hs Library- Build-Depends: base >= 4.5 && < 5,- dlist >= 0.2 && < 1,- ghc >= 7.6,- transformers >= 0.2 && < 1+ Build-Depends:+ base >= 4.5 && < 5,+ dlist >= 0.2 && < 1,+ ghc >= 7.6,+ transformers >= 0.2 && < 1+ default-language: Haskell2010 Ghc-Options: -Wall Exposed-modules: Language.KURE@@ -62,7 +64,6 @@ Language.KURE.Translate Language.KURE.Walker ----+source-repository head+ type: git+ location: git://github.com/ku-fpg/kure