packages feed

mps 2009.7.4 → 2009.8.16

raw patch · 4 files changed

+32/−9 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ MPS.Light: (-) :: (a -> b) -> a -> b
+ MPS.Light: (<->) :: (Num a) => a -> a -> a

Files

changelog.md view
@@ -1,3 +1,10 @@+2009.8.16+---------++### Feature++* redefine -+ 2009.7.15 --------- 
mps.cabal view
@@ -1,8 +1,8 @@ Name:                 mps-Version:              2009.7.4+Version:              2009.8.16 Build-type:           Simple-Synopsis:             OO duck syntax-Description:          message passing style helpers+Synopsis:             simply oo+Description:          DSL that allows one to write Haskell from left to right License:              BSD3 Author:               Wang, Jinjing Maintainer:           Wang, Jinjing <nfjinjing@gmail.com>
readme.md view
@@ -9,6 +9,10 @@     euler_1 = ( [3,6..999] ++ [5,10..999] ).unique.sum  Cheatsheet by [Henry Laxen](http://mazatlan.ning.com/profile/henrylaxen)--------------------------+------------------------------------------------------------------------ -[lhs source](master/src/Test/MPSexamples.lhs)+* [html](http://www.maztravel.com/haskell/MPSexamples.html)+* [pdf](http://www.maztravel.com/haskell/MPSexamples.pdf)+* [lhs](http://www.maztravel.com/haskell/MPSexamples.lhs)++mirrored [lhs source](master/src/Test/MPSexamples.lhs) in repo.
src/MPS/Light.hs view
@@ -6,7 +6,8 @@ import Data.Foldable (elem, foldl, foldl', toList, Foldable) import Data.Function (on) import Debug.Trace-import Prelude hiding ((.), (^), (>), (/), elem, foldl, foldl1)+import Prelude hiding ((.), (^), (>), (/), (-), elem, foldl, foldl1)+import qualified Prelude as Prelude import System.FilePath ((</>)) import qualified Data.Array as A import qualified Data.List as L@@ -14,6 +15,7 @@ import qualified Data.Set as S  -- base DSL+{-# INLINE (.) #-} (.) :: a -> (a -> b) -> b a . f = f a infixl 9 .@@ -30,6 +32,16 @@ (/) = (</>) infixl 5 / +{-# INLINE (-) #-}+(-) :: (a -> b) -> a -> b+f - x =  f x+infixr 0 -++(<->) :: (Num a) => a -> a -> a+(<->) = (Prelude.-)+infix 6 <->++ -- List join :: [a] -> [[a]] -> [a] join = L.intercalate@@ -68,7 +80,7 @@ upto = flip enumFromTo  downto :: (Num t, Enum t) => t -> t -> [t]-downto m n = [n, n-1.. m]+downto m n = [n, n <-> 1.. m]  remove_at :: Int -> [a] -> [a] remove_at n xs = xs.take n ++ xs.drop (n+1)@@ -170,7 +182,7 @@ powerslice :: [a] -> [[a]] powerslice xs = [ xs.slice j (j+i) |   i <- l.downto 1,-  j <- [0..l - i]+  j <- [0..l <-> i]   ]   where l = xs.length @@ -218,7 +230,7 @@  -- Array to_a :: [a] -> A.Array Int a-to_a xs      = A.listArray (0, xs.length - 1) xs+to_a xs      = A.listArray (0, xs.length <-> 1) xs  to_a' :: (A.Ix i) => (i, i) -> [e] -> A.Array i e to_a' i xs = A.listArray i xs