Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class (Ord (Element k), Ord k) => Chunk k where
- type Element k
- type Buffer k
- elementAt :: Buffer k -> Int -> (Element k, Int)
- elementPos :: Element k -> Pos -> Pos
- chunkWidth :: k -> Int
- chunkEqual :: Buffer k -> Int -> k -> Bool
- packChunk :: Buffer k -> Int -> Int -> k
- unpackChunk :: k -> (Buffer k, Int, Int)
- showElement :: Element k -> String
- showChunk :: k -> String
- class Chunk k => CharChunk k where
- data Pos = Pos {
- _posLine :: !Int
- _posColumn :: !Int
- showByte :: Word8 -> String
- showByteString :: ByteString -> String
- unsafeAsciiToChar :: Word8 -> Char
- asc_0 :: Word8
- asc_9 :: Word8
- asc_A :: Word8
- asc_E :: Word8
- asc_P :: Word8
- asc_a :: Word8
- asc_e :: Word8
- asc_p :: Word8
- asc_minus :: Word8
- asc_plus :: Word8
- asc_point :: Word8
- asc_newline :: Word8
Documentation
class (Ord (Element k), Ord k) => Chunk k where Source #
elementAt :: Buffer k -> Int -> (Element k, Int) Source #
elementPos :: Element k -> Pos -> Pos Source #
chunkWidth :: k -> Int Source #
chunkEqual :: Buffer k -> Int -> k -> Bool Source #
packChunk :: Buffer k -> Int -> Int -> k Source #
unpackChunk :: k -> (Buffer k, Int, Int) Source #
showElement :: Element k -> String Source #
Instances
Chunk ByteString Source # | |
Defined in Text.PariPari.Internal.Chunk type Element ByteString :: Type Source # type Buffer ByteString :: Type Source # elementAt :: Buffer ByteString -> Int -> (Element ByteString, Int) Source # elementPos :: Element ByteString -> Pos -> Pos Source # chunkWidth :: ByteString -> Int Source # chunkEqual :: Buffer ByteString -> Int -> ByteString -> Bool Source # packChunk :: Buffer ByteString -> Int -> Int -> ByteString Source # unpackChunk :: ByteString -> (Buffer ByteString, Int, Int) Source # showElement :: Element ByteString -> String Source # showChunk :: ByteString -> String Source # | |
Chunk Text Source # | |
Defined in Text.PariPari.Internal.Chunk elementAt :: Buffer Text -> Int -> (Element Text, Int) Source # elementPos :: Element Text -> Pos -> Pos Source # chunkWidth :: Text -> Int Source # chunkEqual :: Buffer Text -> Int -> Text -> Bool Source # packChunk :: Buffer Text -> Int -> Int -> Text Source # unpackChunk :: Text -> (Buffer Text, Int, Int) Source # |
class Chunk k => CharChunk k where Source #
byteAt :: Buffer k -> Int -> Word8 Source #
charAt :: Buffer k -> Int -> (Char, Int) Source #
charAtFixed :: Int -> Buffer k -> Int -> Char Source #
charWidth :: Char -> Int Source #
stringToChunk :: String -> k Source #
Instances
CharChunk ByteString Source # | |
Defined in Text.PariPari.Internal.Chunk | |
CharChunk Text Source # | |
Line and column position starting at (1,1)
Pos | |
|
Instances
Eq Pos Source # | |
Show Pos Source # | |
Generic Pos Source # | |
type Rep Pos Source # | |
Defined in Text.PariPari.Internal.Chunk type Rep Pos = D1 (MetaData "Pos" "Text.PariPari.Internal.Chunk" "paripari-0.6.0.1-JCqv7UKAs2N5N8Bslf6KXq" False) (C1 (MetaCons "Pos" PrefixI True) (S1 (MetaSel (Just "_posLine") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "_posColumn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))) |
showByteString :: ByteString -> String Source #
unsafeAsciiToChar :: Word8 -> Char Source #
asc_newline :: Word8 Source #