Code Monkey home page Code Monkey logo

extensible-printf's Introduction

Extensible-Printf

Copyright © 2013 Bart Massey

XXX This package is deprecated as of 2013-09-18. The good news is that it is deprecated because it is expected to replace Text.Printf in GHC 7.8. So feel free to try it out from here, but expect to use it from there in the very near future.

This is a filled-out Haskell Text.Printf implementation enhanced to allow extending printf to new datatypes. It was originally inspired by my need for such a thing, and by finding this two-message email-list thread from May 2006 in which John Meacham and Simon Marlow suggest an implementation.

The tests are not here. Rather, they are on Github in the package printf-tests. This is because they grew into an elaborate project of their own, and are intended to work with multiple and multilingual implementations of printf().

This implementation has been enhanced to allow most of the formatting syntax of C printf(3). Text.Printf.Extensible.printf passes all of the applicable tests that glibc printf does: approximately 350 tests currently. Text.Printf.printf, on the other hand, currently fails about 150 of these tests.

This module is intended to be a 100% backward-compatible superceding implementation of Text.Printf. I hope that it will eventually replace the current Text.Printf in the GHC libraries.

This work is reasonably well-documented in Haddock, and is under a 3-clause BSD license as per Lennart Augustsson's original implementation of Text.Printf, from which most of the code was taken, and much was heavily modified.

extensible-printf's People

Contributors

bartmassey avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.