pointfree-fancy 1.1.1.3 → 1.1.1.4
raw patch · 3 files changed
+87/−77 lines, 3 filesdep ~haskell-src-extsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: haskell-src-exts
API changes (from Hackage documentation)
Files
- Plugin/Pl/Rules.hs +7/−2
- pointfree-fancy.cabal +74/−73
- test/Test.hs +6/−2
Plugin/Pl/Rules.hs view
@@ -224,7 +224,7 @@ crossE = Quote $ Var Inf "***" firstE = Quote $ Var Pref "first" secondE = Quote $ Var Pref "second"-interE = Quote $ Var Pref "inter"+chainE = Quote $ Var Inf ">>" andE = Quote $ Var Pref "and" orE = Quote $ Var Pref "or" allE = Quote $ Var Pref "all"@@ -714,8 +714,13 @@ rr (flipE `a` extE) (bindE), + -- \f g x -> g x+ -- f >> g+ {--(>>) ::+ (c -> a) -> (c -> b) -> (c -> b)--}+ -- flip (>=>) --> <=<- rr (flipE `a` fishE)+ Hard $ rr (flipE `a` fishE) (kliesliE), -- (.) . (=<<) --> <=<
pointfree-fancy.cabal view
@@ -1,78 +1,79 @@-cabal-version: >=1.8-name: pointfree-fancy-version: 1.1.1.3-license: BSD3-license-file: LICENSE-maintainer: Vanessa McHale <vamchale@gmail.com>-author: Thomas Jäger-tested-with: ghc ==8.0.1 ghc ==8.2.2 ghc ==8.4.1 ghc ==7.10.3-synopsis: Tool for refactoring expressions into pointfree form-description:+Cabal-Version: >= 1.8++Name: pointfree-fancy+Version: 1.1.1.4+Category: Tool+Synopsis: Tool for refactoring expressions into pointfree form++Description: The pointfree tool is a standalone command-line version of the pl- plugin for lambdabot.-category: Tool-build-type: Simple-extra-source-files:- ChangeLog- README- test/Test.hs+ plugin for lambdabot. This fork extends it to include several functions for+ higher-order composition not in the prelude. -source-repository head- type: git- location: git://github.com/benmachine/pointfree.git+Author: Thomas Jäger+Maintainer: Vanessa McHale <vanessa.mchale@reconfigure.io>+License: OtherLicense+License-file: LICENSE -library- exposed-modules:- Pointfree- other-modules:- Plugin.Pl.Common- Plugin.Pl.Parser- Plugin.Pl.PrettyPrinter- Plugin.Pl.Optimize- Plugin.Pl.Rules- Plugin.Pl.Transform- ghc-options: -W- build-depends:- base >=4.5 && <5.0,- array >=0.3 && <0.6,- containers >=0.4 && <0.6,- haskell-src-exts >=1.18 && <1.21,- transformers <0.6+Extra-source-files: ChangeLog README test/Test.hs -executable pointfree- main-is: Main.hs- other-modules:- Plugin.Pl.Common- Plugin.Pl.Parser- Plugin.Pl.PrettyPrinter- Plugin.Pl.Optimize- Plugin.Pl.Rules- Plugin.Pl.Transform- ghc-options: -W- build-depends:- base >=4.3 && <5.0,- array >=0.3 && <0.6,- containers >=0.4 && <0.6,- haskell-src-exts >=1.18 && <1.21,- transformers <0.6+Build-type: Simple+Tested-with: GHC == 8.0.1 -test-suite tests- type: exitcode-stdio-1.0- main-is: Test.hs- hs-source-dirs: . test- other-modules:- Plugin.Pl.Common- Plugin.Pl.Parser- Plugin.Pl.PrettyPrinter- Plugin.Pl.Optimize- Plugin.Pl.Rules- Plugin.Pl.Transform- ghc-options: -W- build-depends:- array >=0.3 && <0.6,- base <5,- containers >=0.3 && <0.6,- haskell-src-exts >=1.18 && <1.20,- HUnit >=1.1 && <1.7,- QuickCheck >=2.1 && <2.11,- transformers <0.6+Source-repository head+ type: git+ location: git://github.com/benmachine/pointfree.git++Library+ Exposed-modules: Pointfree++ Build-depends: base >= 4.5 && < 5.0,+ array >= 0.3 && < 0.6,+ containers >= 0.4 && < 0.6,+ haskell-src-exts >= 1.18 && < 1.20,+ transformers < 0.6+ Other-modules: Plugin.Pl.Common+ Plugin.Pl.Parser+ Plugin.Pl.PrettyPrinter+ Plugin.Pl.Optimize+ Plugin.Pl.Rules+ Plugin.Pl.Transform+ GHC-options: -W++Executable pointfree+ Main-is: Main.hs+ GHC-options: -W+ Build-depends: base >= 4.3 && < 5.0,+ array >= 0.3 && < 0.6,+ containers >= 0.4 && < 0.6,+ haskell-src-exts >= 1.18 && < 1.20,+ transformers < 0.6+ Other-modules: Plugin.Pl.Common+ Plugin.Pl.Parser+ Plugin.Pl.PrettyPrinter+ Plugin.Pl.Optimize+ Plugin.Pl.Rules+ Plugin.Pl.Transform++Test-suite tests+ Type: exitcode-stdio-1.0++ Main-is: Test.hs+ Other-modules: Plugin.Pl.Common+ Plugin.Pl.Parser+ Plugin.Pl.PrettyPrinter+ Plugin.Pl.Optimize+ Plugin.Pl.Rules+ Plugin.Pl.Transform++ Build-depends:+ array >= 0.3 && < 0.6,+ base < 5,+ containers >= 0.3 && < 0.6,+ haskell-src-exts >= 1.18 && < 1.20,+ HUnit >= 1.1 && < 1.7,+ QuickCheck >= 2.1 && < 2.11,+ transformers < 0.6++ GHC-Options: -W+ Hs-source-dirs: . test
test/Test.hs view
@@ -110,14 +110,16 @@ unitTest "all id" ["and"], unitTest "\\x y -> g (f x y) y" ["f >=> g"], unitTest "any id" ["or"],- unitTest "flip (.)" ["(-.)"],+ unitTest "liftA2 (||) x y" ["x <||> y"],+ unitTest "flip (.)" ["(<&>)"], unitTest "flip (<$)" ["($>)"],+ -- unitTest "zipWith ($) functions (repeat x)" ["fmap (x &) functions"], unitTest "fmap . const" ["(<$)"], unitTest "(.) . const" ["(<$)"], -- unitTest "\\x y -> h (f x) y" ["(argument %~ f) h"], -- unitTest "(mapped.argument %~ f) h x y" ["f -.* h"],- -- unitTest "fmap (<> a)" ["mapping <>= a"], unitTest "and . map f" ["all f"],+ unitTest "flip (<=)" ["(>)"], unitTest "(f =<<) . g" ["f <=< g"], unitTest "or . map f" ["any f"], unitTest "\\x y -> f (x == y)" ["f .* (==)"],@@ -130,6 +132,7 @@ unitTest "concat ([concat (map h (k a))])" ["h =<< k a"], unitTest "uncurry (const f)" ["f . snd"], unitTest "uncurry const" ["fst"],+ -- unitTest "\\f g x -> g x" ["f >> g"], unitTest "uncurry (const . f)" ["f . fst"], unitTest "\\a b -> a >>= \\x -> b >>= \\y -> return (x,y)" ["liftM2 (,)"], unitTest "\\b a -> a >>= \\x -> b >>= \\y -> return (x,y)" ["flip liftM2 (,)"],@@ -138,6 +141,7 @@ unitTest "\\x -> f x x" ["join f"], unitTest "join (+) 1" ["2"], unitTest "fmap f g x" ["f (g x)"],+ unitTest "concatMap" ["(=<<)"], unitTest "liftM2 (+) f g 0" ["f 0 + g 0", "g 0 + f 0"], unitTest "return 1 x" ["x"], unitTest "f =<< return x" ["f x"],