ormolu-0.1.2.0: A formatter for Haskell source code

Safe Haskell | None
Language | Haskell2010

Ormolu.Parser.Shebang

Description

A module for dealing with shebangs.

Synopsis

- newtype Shebang = Shebang (Located String)
- extractShebangs :: [Located String] -> ([Shebang], [Located String])
- isShebang :: String -> Bool

# 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 Source # (/=) :: Shebang -> Shebang -> Bool Source #
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 Source #

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

toConstr :: Shebang -> Constr Source #

dataTypeOf :: Shebang -> DataType Source #

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

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

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

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

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

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

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

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

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

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

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.