packages feed

haskell-src-exts-util 0.2.1 → 0.2.1.1

raw patch · 3 files changed

+7/−10 lines, 3 files

Files

haskell-src-exts-util.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           haskell-src-exts-util-version:        0.2.1+version:        0.2.1.1 synopsis:       Helper functions for working with haskell-src-exts trees description:    see README.md category:       language
src/Language/Haskell/Exts/FreeVars.hs view
@@ -15,7 +15,7 @@  import           Data.Data import           Data.Generics.Uniplate.Data-import           Data.Monoid+import           Data.Monoid (Monoid(..)) import           Data.Set                      (Set) import qualified Data.Set                      as Set import           Language.Haskell.Exts
src/Language/Haskell/Exts/Util/Internal.hs view
@@ -6,13 +6,6 @@ --  in Neil Mitchell's HLint. module Language.Haskell.Exts.Util.Internal where -import           Control.Monad-import           Data.Data                   hiding (Fixity)-import           Data.Default-import           Data.Functor-import           Data.Generics.Uniplate.Data-import           Data.List-import           Data.Maybe import           Language.Haskell.Exts import           Prelude @@ -21,13 +14,17 @@  -- is* :: Exp l -> Bool -- is* :: Decl s -> Bool+isApp :: Exp l -> Bool isApp App{} = True; isApp _ = False+isAnyApp :: Exp l -> Bool isAnyApp x = isApp x || isInfixApp x+isInfixApp :: Exp l -> Bool isInfixApp InfixApp{} = True; isInfixApp _ = False  isDot :: QOp s -> Bool isDot (QVarOp _ (UnQual _ (Symbol _ "."))) = True isDot _                                    = False+isSection :: Exp l -> Bool isSection LeftSection{}  = True isSection RightSection{} = True isSection _              = False@@ -36,8 +33,8 @@ isDotApp (InfixApp _ _ dot _) | isDot dot = True isDotApp _                    = False +isLexeme :: Exp l -> Bool isLexeme Var{} = True isLexeme Con{} = True isLexeme Lit{} = True isLexeme _     = False-