{-# LANGUAGE FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Language.Haskell.Exts.Util.Internal where
import Language.Haskell.Exts
import Prelude
isApp :: Exp l -> Bool
isApp :: Exp l -> Bool
isApp App{} = Bool
True; isApp _ = Bool
False
isAnyApp :: Exp l -> Bool
isAnyApp :: Exp l -> Bool
isAnyApp x :: Exp l
x = Exp l -> Bool
forall l. Exp l -> Bool
isApp Exp l
x Bool -> Bool -> Bool
|| Exp l -> Bool
forall l. Exp l -> Bool
isInfixApp Exp l
x
isInfixApp :: Exp l -> Bool
isInfixApp :: Exp l -> Bool
isInfixApp InfixApp{} = Bool
True; isInfixApp _ = Bool
False
isDot :: QOp s -> Bool
isDot :: QOp s -> Bool
isDot (QVarOp _ (UnQual _ (Symbol _ "."))) = Bool
True
isDot _ = Bool
False
isSection :: Exp l -> Bool
isSection :: Exp l -> Bool
isSection LeftSection{} = Bool
True
isSection RightSection{} = Bool
True
isSection _ = Bool
False
isDotApp :: Exp s -> Bool
isDotApp :: Exp s -> Bool
isDotApp (InfixApp _ _ dot :: QOp s
dot _) | QOp s -> Bool
forall s. QOp s -> Bool
isDot QOp s
dot = Bool
True
isDotApp _ = Bool
False