Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7660347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:27:12+00:00 2026-05-31T13:27:12+00:00

So from a glance at hackage I can see 5 pretty printing libraries: good

  • 0

So from a glance at hackage I can see 5 pretty printing libraries:

  • good old HughesPJ in pretty
  • wl-pprint-extras
  • wl-pprint-terminfo
  • wl-pprint
  • ansi-wl-pprint
  • wl-pprint-text

Oh wait, was that 6? 6 pretty printing libraries… no wait, we’ll come in again.

Anyway, they’re all Wadler-Leijen except of course HughesPJ. My understanding is that WL is simpler and faster, so is probably preferred for new code.

wl-pprint and wl-pprint-extras seem to be the same… I can’t tell what’s “extra” about the latter, or what “Free” means here (the module is Text.PrettyPrint.Free).

wl-pprint-terminfo and ansi-wl-pprint both seem to be variants with ANSI terminal colors and whatnot, and seem equivalent except that wl-pprint-terminfo doesn’t have any docs.

wl-pprint-text, of course, uses Text. I don’t know how much difference that actually makes wrt speed.

The thing that worries me about these is that many of them have many releases. This implies they’ve had features added, bugs fixed, etc. But have they all had the same bugs fixed? I’m inclined to favor ansi-wl-pprint because it has documentation and its last upload was in 2012, and has a bunch of releases which implies the author still works on it.

But I don’t know for sure. Anyone have any advice? And I’m sure others agree that 5 almost-but-not-quite copy-paste modules could do with some consolidation…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:27:13+00:00Added an answer on May 31, 2026 at 1:27 pm

    In no particular order:

    • The “Free” in Text.PrettyPrint.Free means free monad, as per the package description: “A free monad based on the Wadler/Leijen pretty printer”; its Doc type is parametrised on another type, and it has a Monad instance, allowing you to embed “effects” into Doc values. This is used by wl-pprint-terminfo to add formatting functionality; it’s not not a competing package, but rather an extension library by the same author. See the list of additions in wl-pprint-extras’ documentation compared to wl-pprint’s list for more detailed information on what it adds.

    • wl-pprint-terminfo uses the terminfo package to do formatting, so it’ll only work on POSIX-y systems, whereas ansi-wl-pprint uses the ansi-terminal package, so it’ll work on Windows.

    • wl-pprint-text might be useful if you’re working with Text already, but it’s unlikely to have a major performance impact unless you’re using the pretty printer really heavily; it’s not exactly a massively computationally-intensive task.

    Unless I had specific requirements, I’d probably just use the pretty package, since it’s one of the boot packages, and thus available everywhere. I’d go for ansi-wl-pprint if I wanted formatting, and wl-pprint-text if I was working with Text, but otherwise I don’t really see a particularly compelling reason to use a third-party library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From time to time I see an enum like the following: [Flags] public enum
From what I can gather, there are three categories: Never use GET and use
I want to download a file from Internet and InternetReadFile seem a good and
What are the good ways to handle complicated business logic that from the first
Can I safely use XStream to process XML coming from outside of my system
From first glance, it would appear I have two basic choices for storing ZIP
From a cursory glance, they appear to be simply two different approaches to the
At first glance it seems like a good idea to let the hard disk
From a web developer point of view, what changes are expected in the development
From a desktop application developer point of view, is there any difference between developing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.