scanf-0.1.0.0: Easy and type-safe format strings for parsing and printing

Safe HaskellNone
LanguageHaskell2010

Text.Scanf.TH

Synopsis

Documentation

fmt :: QuasiQuoter Source #

Parse a typed Format string.

The following conversion strings are supported:

  • %d: signed integer (Int)
  • %l: signed integer (Integer, unbounded)
  • %f: floating point (Double)
  • %s: string of non-space characters (String)
  • %c: single character (Char)
  • %%: parse/print a literal percent character

N.B.: in scanf, spaces in the format string match any number of whitespace character until the next nonspace character.

[fmt|%d lazy %s and %d strict %s|]
  :: Format (Int :+ String :+ Int :+ String :+ ())