fourmolu-0.3.0.0: A formatter for Haskell source code
Safe HaskellNone
LanguageHaskell2010

Ormolu.Parser.Shebang

Description

A module for dealing with shebangs.

Synopsis

Documentation

newtype Shebang Source #

A wrapper for a shebang.

Constructors

Shebang (Located String) 

Instances

Instances details
Eq Shebang Source # 
Instance details

Defined in Ormolu.Parser.Shebang

Methods

(==) :: Shebang -> Shebang -> Bool #

(/=) :: Shebang -> Shebang -> Bool #

Data Shebang Source # 
Instance details

Defined in Ormolu.Parser.Shebang

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Shebang -> c Shebang #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Shebang #

toConstr :: Shebang -> Constr #

dataTypeOf :: Shebang -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Shebang) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Shebang) #

gmapT :: (forall b. Data b => b -> b) -> Shebang -> Shebang #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Shebang -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Shebang -> r #

gmapQ :: (forall d. Data d => d -> u) -> Shebang -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Shebang -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Shebang -> m Shebang #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Shebang -> m Shebang #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Shebang -> m Shebang #

extractShebangs :: [Located String] -> ([Shebang], [Located String]) Source #

Extract shebangs from the beginning of a comment stream.

isShebang :: String -> Bool Source #

Return True if given String is a shebang.