Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- data IOScannerState a
- type IOScanner a = a -> Word8 -> IOScannerState a
- anyScanner :: Default a => [IOScanner a] -> IOScanner [a]
- textScanner :: [Word8] -> IOScanner [[Word8]]
Documentation
data IOScannerState a Source
State of an IO scanner. Differently from a parser scanner, an IO scanner must deal with blocking behavior.
Finished | A scanner returns Finished when the current input is not part of the result, and the scanning must stop before this input. |
LastPass a | A scanner returns LastPass when the current input is the last one of the result, and the scanning must stop before after this input, without consuming more data. |
Running a | A scanner returns Running when the current input is part of the result, and the scanning must continue. |
type IOScanner a = a -> Word8 -> IOScannerState a Source
anyScanner :: Default a => [IOScanner a] -> IOScanner [a] Source
textScanner :: [Word8] -> IOScanner [[Word8]] Source