cabal-gild-1.3.1.0: Formats package descriptions.
Safe HaskellSafe-Inferred
LanguageHaskell2010

CabalGild.Unstable.Action.ExtractComments

Synopsis

Documentation

fromByteString :: ByteString -> [Comment Position] Source #

Extracts comments from the given byte string. This is a wrapper around fromLine, where lines are split using lines.

fromLine :: (Alternative m, Monad m) => Int -> ByteString -> m (Comment Position) Source #

Extracts a comment from the given line. If the line does not contain a comment, the result will be empty.

breakComment :: ByteString -> (ByteString, ByteString) Source #

Breaks a byte string into two parts: the part before the comment delimiter and the part after. If there is no comment, the part after will be empty.

isBlank :: Word8 -> Bool Source #

Returns true if the given byte is a blank character. Currently this is a wrapper around isSpaceWord8. Perhaps it should only check for spaces and tabs though.