mmm-0.1.0.0: Minecraft 1.21.4 implementation in Haskell
LicenseBSD-3-Clause
Safe HaskellNone
LanguageGHC2021

M.IO.Internal.Read

Description

This module provides parsing utilities for reading structured data from streams.

Synopsis

Basic parsing

parseio Source #

Arguments

:: Exception e 
=> r

state

-> Int

int value

-> InputStream ByteString

input stream

-> ParserIO r e a

parser

-> IO a

result

Parse from a stream. Automatically handles chunked input by concatenating chunks until a complete parse succeeds.

May throw: * The parser's error type e * IOError "parseio: unexpected end of input"

parseio0 Source #

Arguments

:: Exception e 
=> InputStream ByteString

input stream

-> ParserIO () e a

parser

-> IO a

result

parse from a stream (with no state and int value of 0). see also: parseio

Lifted versions

parseiolift Source #

Arguments

:: (MonadIO m, Exception e) 
=> r

state

-> Int

int value

-> InputStream ByteString

input stream

-> ParserIO r e a

parser

-> m a

result

lifted version of parseio

parseio0lift Source #

Arguments

:: (MonadIO m, Exception e) 
=> InputStream ByteString

input stream

-> ParserIO () e a

parser

-> m a

result

lifted version of parseio0