pointfree 1.0.3 → 1.0.4
raw patch · 8 files changed
+52/−43 lines, 8 filesdep ~arraydep ~basedep ~containersnew-uploader
Dependency ranges changed: array, base, containers, mtl, parsec
Files
- Main.hs +0/−1
- Plugin/Pl/Common.hs +0/−2
- Plugin/Pl/Optimize.hs +2/−3
- Plugin/Pl/Parser.hs +4/−5
- Plugin/Pl/PrettyPrinter.hs +2/−1
- Plugin/Pl/Rules.hs +3/−4
- Plugin/Pl/Transform.hs +3/−3
- pointfree.cabal +38/−24
Main.hs view
@@ -5,7 +5,6 @@ import Plugin.Pl.Parser import Plugin.Pl.Transform -import Data.List (intersperse) import System.Environment (getArgs) import System.Console.GetOpt
Plugin/Pl/Common.hs view
@@ -1,5 +1,3 @@-{-# OPTIONS -fvia-C #-}- module Plugin.Pl.Common ( Fixity(..), Expr(..), Pattern(..), Decl(..), TopLevel(..), bt, sizeExpr, mapTopLevel, mapTopLevel', getExpr,
Plugin/Pl/Optimize.hs view
@@ -1,14 +1,13 @@-{-# OPTIONS -fvia-C -O2 -optc-O3 #-}+{-# LANGUAGE ImplicitParams #-} module Plugin.Pl.Optimize ( optimize, ) where import Plugin.Pl.Common import Plugin.Pl.Rules-import Plugin.Pl.PrettyPrinter+import Plugin.Pl.PrettyPrinter () import Data.List (nub)-import Control.Monad.State cut :: [a] -> [a] cut = take 1
Plugin/Pl/Parser.hs view
@@ -1,4 +1,3 @@-{-# OPTIONS -fvia-C -O2 -optc-O3 #-} -- -- Todo, use Language.Haskell --@@ -25,8 +24,8 @@ brackets :: Parser a -> Parser a brackets = T.brackets tp -symbol :: String -> Parser String-symbol = T.symbol tp+symbol :: String -> Parser ()+symbol = fmap (const ()) . T.symbol tp atomic :: Parser String atomic = try (show `fmap` T.natural tp) <|> T.identifier tp@@ -55,7 +54,7 @@ inf :: (String, (Assoc, Int)) -> Operator Char st Expr inf (name, (assoc, _)) = Infix (try $ do - string name+ _ <- string name notFollowedBy $ oneOf opchars spaces let name' = if head name == '`' @@ -197,7 +196,7 @@ endsIn :: Parser a -> Parser b -> Parser [a] endsIn p end = do xs <- many p- end+ _ <- end return $ xs input :: Parser TopLevel
Plugin/Pl/PrettyPrinter.hs view
@@ -1,4 +1,5 @@-{-# OPTIONS -fvia-C -fno-warn-orphans #-}+{-# LANGUAGE PatternGuards #-}+{-# OPTIONS_GHC -fno-warn-orphans #-} module Plugin.Pl.PrettyPrinter (Expr) where -- Dummy export to make ghc -Wall happy
Plugin/Pl/Rules.hs view
@@ -1,7 +1,6 @@-{-# OPTIONS -fvia-C #-}-{-# OPTIONS -fno-warn-name-shadowing #-}--- 6.4 gives a name shadow warning I haven't tracked down.-+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE ScopedTypeVariables #-} -- -- | This marvellous module contributed by Thomas J\344ger --
Plugin/Pl/Transform.hs view
@@ -1,10 +1,10 @@-{-# OPTIONS -fvia-C -O2 -optc-O3 #-}+{-# LANGUAGE FlexibleInstances #-} module Plugin.Pl.Transform ( transform, ) where import Plugin.Pl.Common-import Plugin.Pl.PrettyPrinter+import Plugin.Pl.PrettyPrinter () import qualified Data.Map as M @@ -74,7 +74,7 @@ -- act like a reader monad inEnv :: State s a -> State s a- inEnv (State f) = State $ \s -> (fst $ f s, s)+ inEnv f = gets $ evalState f alphaPat (PVar v) = do fm <- get
pointfree.cabal view
@@ -1,29 +1,43 @@-name: pointfree-version: 1.0.3-synopsis: Pointfree refactoring tool-description: Stand-alone command-line version of the point-less plugin for lambdabot.-license: OtherLicense-license-file: LICENSE-author: Thomas Jäger-homepage: http://haskell.org/haskellwiki/Pointfree-category: Tool-build-depends: base, parsec, mtl, containers, array-build-type: Simple+Cabal-Version: >= 1.6 -extra-source-files:- Plugin/Pl/PrettyPrinter.hs- , Plugin/Pl/Parser.hs- , Plugin/Pl/Optimize.hs- , Plugin/Pl/Rules.hs- , Plugin/Pl/Transform.hs- , Plugin/Pl/Common.hs- , test/Makefile- , test/Test.hs- , README+Name: pointfree+Version: 1.0.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. +Author: Thomas Jäger+Maintainer: Ben Millwood <haskell@benmachine.co.uk>+License: OtherLicense+License-file: LICENSE +Build-type: Simple+Extra-source-files: README test/Makefile test/Test.hs -executable: pointfree-main-is: Main.hs-ghc-options: -Wall -funbox-strict-fields -fglasgow-exts+Source-repository head+ type: git+ location: git://github.com/benmachine/stepeval.git++Executable pointfree+ Main-is: Main.hs+ GHC-options: -Wall+ Extensions: ExistentialQuantification,+ FlexibleInstances,+ ImplicitParams,+ PatternGuards,+ ScopedTypeVariables+ Build-depends: base >= 3 && < 4.4,+ array >= 0.3 && < 0.4,+ containers >= 0.3 && < 0.5,+ parsec >= 2 && < 3.2,+ mtl >= 2 && < 2.1+ Other-modules: Plugin.Pl.Common+ Plugin.Pl.Parser+ Plugin.Pl.PrettyPrinter+ Plugin.Pl.Optimize+ Plugin.Pl.Rules+ Plugin.Pl.Transform+