pointfree-fancy 1.1.1.8 → 1.1.1.9
raw patch · 4 files changed
+15/−9 lines, 4 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Setup.hs +0/−2
- pointfree-fancy.cabal +1/−1
- src/Plugin/Pl/Rules.hs +10/−4
- test/Test.hs +4/−2
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
pointfree-fancy.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: pointfree-fancy-version: 1.1.1.8+version: 1.1.1.9 license: BSD3 license-file: LICENSE maintainer: Vanessa McHale <vamchale@gmail.com>
src/Plugin/Pl/Rules.hs view
@@ -160,19 +160,19 @@ up = fix . Up -idE, flipE, bindE, extE, returnE, consE, appendE, nilE, foldrE, foldlE, fstE,+idE, flipE, bindE, extE, consE, appendE, nilE, foldrE, foldlE, fstE, sndE, dollarE, constE, uncurryE, curryE, compE, headE, tailE, sE, commaE, fixE, foldl1E, notE, equalsE, nequalsE, plusE, multE, zeroE, oneE, lengthE, sumE, productE, concatE, concatMapE, joinE, mapE, fmapE, fmapIE, subtractE, minusE, liftME, apE, liftM2E, seqME, zipE, zipWithE, onE, oedipusE, comp2E,- crossE, firstE, secondE, andE, orE, allE, anyE :: MExpr+ crossE, firstE, secondE, andE, orE, allE, anyE, returnE, fishE, mfishE :: MExpr idE = Quote $ Var Pref "id" flipE = Quote $ Var Pref "flip" constE = Quote $ Var Pref "const" compE = Quote $ Var Inf "." comp2E = Quote $ Var Inf ".*" comp3E = Quote $ Var Inf ".**"-eyeE = Quote $ Var Inf "-."+eyeE = Quote $ Var Inf "<&>" oedipusE = Quote $ Var Inf "-.*" oedipus2E = Quote $ Var Inf "-.**" onE = Quote $ Var Pref "on"@@ -231,6 +231,7 @@ anyE = Quote $ Var Pref "any" replaceE = Quote $ Var Inf "<$" pointyE = Quote $ Var Inf "$>"+mfishE = Quote $ Var Inf "<=*<" @@ -609,7 +610,7 @@ Hard $ rr (\f g -> (compE `a` f) `c` g) (\f g -> comp2E `a` f `a` g), - -- flip (.) -> (-.)+ -- flip (.) -> (<&>) rr (flipE `a` compE) eyeE, @@ -726,6 +727,11 @@ Hard $ rr (\f g -> joinE `c` (g `c2` f)) (\f g -> fishE `a` f `a` g),++ -- flip flip id . (ap .* (f .** g)) -> f <=*<+ Hard $+ rr (\f g -> flipE `a` flipE `a` idE `c` (apE `c2` (f `c3` g)))+ (\f g -> mfishE `a` f `a` g), -- (`ap` snd) . (fst -.* (flip =<< (.) .* ((,) .))) --> join (***) -- Hard $
test/Test.hs view
@@ -109,7 +109,8 @@ unitTest "all id" ["and"], unitTest "\\x y -> g (f x y) y" ["f >=> g"], unitTest "any id" ["or"],- unitTest "flip (.)" ["(-.)"],+ unitTest "flip (.)" ["(<&>)"],+ unitTest "flip ($)" ["(&)"], unitTest "flip (<$)" ["($>)"], unitTest "fmap . const" ["(<$)"], unitTest "(.) . const" ["(<$)"],@@ -141,6 +142,7 @@ unitTest "return 1 x" ["x"], unitTest "f =<< return x" ["f x"], unitTest "(=<<) id" ["join"],+ unitTest "\\x y z -> f (g x y z) z" ["f <=*< g"], unitTest "zipWith (,)" ["zip"], unitTest "map fst . zip [1..]" ["zipWith const [1..]"], unitTest "curry . uncurry" ["id"],@@ -202,7 +204,7 @@ unitTest "(concat .) . map" ["(=<<)"], unitTest "let f ((a,b),(c,d)) = a + b + c + d in f ((1,2),(3,4))" ["10"], unitTest "let x = const 3 y; y = const 4 x in x + y" ["7"], -- yay!- unitTest "(\\n -> (return 0) ± (return $ sqrt n))" ["(return 0 ±) . return . sqrt"],+ unitTest "(\\n -> (pure 0) ± (pure $ sqrt n))" ["(pure 0 ±) . pure . sqrt"], unitTest "\\b -> (\\c -> ((Control.Monad.>>=) c) (\\g -> Control.Applicative.pure (b g)))" ["flip (Control.Monad.>>=) . (Control.Applicative.pure .)"], unitTest "\\(x, y) -> z" ["const z"],