scanf alternatives and similar packages
Based on the "Text" category.
Alternatively, view scanf alternatives based on common mentions on social networks and blogs.
-
pandoc-citeproc
Library and executable for using citeproc with pandoc -
scholdoc
Fork of Pandoc for the implementation of a ScholarlyMarkdown parser -
blaze-from-html
A blazingly fast HTML combinator library for Haskell. -
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
prettyprinter
A modern, extensible and well-documented prettyprinter. -
regex-genex
Given a list of regexes, generate all possible strings that matches all of them. -
commonmark
Pure Haskell commonmark parsing library, designed to be flexible and extensible -
regex-applicative
Regex-based parsing with an applicative interface -
pandoc-csv2table
A Pandoc filter that renders CSV as Pandoc Markdown Tables. -
servant-checked-exceptions
type-level errors for Servant APIs. -
text-format
A Haskell text formatting library optimized for ease of use and high performance. -
diagrams-pandoc
A pandoc filter to express diagrams inline using the haskell EDSL diagrams. -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library. -
boxes
A pretty-printing library for laying out text in two dimensions, using a simple box model. -
ghc-syntax-highlighter
Syntax highlighter for Haskell using the lexer of GHC
Less time debugging, more time building
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of scanf or a related project?
README
Haskell scanf

A lightweight library for one-off parsing and printing.
scanf [fmt|%d lazy %s and %d strict %s|]
"3 lazy functions and 2 strict fields"
= Just (3 :+ "functions" :+ 2 :+ "fields" :+ ())
Quasiquotes are optional. Format strings can also be defined with pure Haskell combinators.
printf (fmt_ (int . " lazy " % string . " and " % int . " strict " % string)
(8 :+ "dogs" :+ 9 :+ "cats" :+ ())
= "8 lazy dogs and 9 strict cats"
With quasiquotes, 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.
Though it also offers a printf
function, scanf is thus named as
there are only few other preexisting Haskell implementations,
whereas many Haskell printf libraries can already be found on Hackage.
Similar to:
- xformat (scanf and printf)
- fmt (printf)
- formatting (printf)