uni-util-2.2.1.2: Utilities for the uniform workbench

Safe HaskellSafe-Infered

Util.BinaryExtras

Description

This module contains various extra Binary instances, for example ones which are particular GHC or uni-specific.

Synopsis

Documentation

hReadLtdSource

Arguments

:: HasBinary a IO 
=> Int

the maximum number of characters

-> Handle 
-> IO (WithError a) 

Read something, but throw an exception if there is an attempt to read too many characters.

initialClockTime :: ClockTimeSource

Time this code was written. We bung this definition in here because this module needs GHC-specific access to ClockTime anyway.