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 5838711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:29:49+00:00 2026-05-22T11:29:49+00:00

Text Text.Parsec Text.Parsec.ByteString Text.Parsec.ByteString.Lazy Text.Parsec.Char Text.Parsec.Combinator Text.Parsec.Error Text.Parsec.Expr Text.Parsec.Language Text.Parsec.Perm Text.Parsec.Pos Text.Parsec.Prim Text.Parsec.String Text.Parsec.Token

  • 0
Text
    Text.Parsec
        Text.Parsec.ByteString
            Text.Parsec.ByteString.Lazy
        Text.Parsec.Char
        Text.Parsec.Combinator
        Text.Parsec.Error
        Text.Parsec.Expr
        Text.Parsec.Language
        Text.Parsec.Perm
        Text.Parsec.Pos
        Text.Parsec.Prim
        Text.Parsec.String
        Text.Parsec.Token
    ParserCombinators
        Text.ParserCombinators.Parsec
            Text.ParserCombinators.Parsec.Char
            Text.ParserCombinators.Parsec.Combinator
            Text.ParserCombinators.Parsec.Error
            Text.ParserCombinators.Parsec.Expr
            Text.ParserCombinators.Parsec.Language
            Text.ParserCombinators.Parsec.Perm
            Text.ParserCombinators.Parsec.Pos
            Text.ParserCombinators.Parsec.Prim
            Text.ParserCombinators.Parsec.Token

Are they the same?

  • 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-22T11:29:50+00:00Added an answer on May 22, 2026 at 11:29 am

    At the moment there are two widely used major versions of Parsec: Parsec 2 and
    Parsec 3.

    My advice is simply to use the latest release of Parsec 3. But if you want to
    make a conscientious choice, read on.

    New in Parsec 3

    Monad Transformer

    Parsec 3 introduces a monad transformer, ParsecT, which can be used to combine
    parsing with other monadic effects.

    Streams

    Although Parsec 2 lets you to choose the token type (which is useful when you
    want to separate lexical analysis from the parsing), the tokens are always
    arranged into lists. List may be not the most efficient data structure in which to store
    large texts.

    Parsec 3 can work with arbitrary streams — data structures with a list-like
    interface. You can define your own streams, but Parsec 3 also includes a popular
    and efficient Stream implementation based on ByteString (for Char-based
    parsing), exposed through the modules Text.Parsec.ByteString and
    Text.Parsec.ByteString.Lazy.

    Reasons to prefer Parsec 2

    Fewer extensions required

    Advanced features provided by Parsec 3 do not come for free; to implement them
    several language extensions are required.

    Neither of the two versions is Haskell-2010 (i.e. both use extensions), but
    Parsec 2 uses fewer extensions than Parsec 3, so chances that any given compiler
    can compile Parsec 2 are higher than those for Parsec 3.

    By this time both versions work with GHC, while Parsec 2 is also reported to
    build with JHC and is included as one of the JHC’s standard libraries.

    Performance

    Originally (i.e. as of 3.0 version) Parsec 3 was considerably slower than
    Parsec 2. However, work on improving Parsec 3 performance has been done,
    and as of version 3.1 Parsec 3 is only slightly slower than Parsec 2
    (benchmarks: 1, 2).

    Compatibility layer

    It has been possible to "reimplement" all of the Parsec 2 API in Parsec 3. This
    compatibility layer is provided by the Parsec 3 package under the module hierarchy
    Text.ParserCombinators.Parsec (the same hierarchy which is used by Parsec 2),
    while the new Parsec 3 API is available under the Text.Parsec hierarchy.

    This means that you can use Parsec 3 as a drop-in replacement for Parsec 2.

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

Sidebar

Related Questions

Is this a bug? {-# LANGUAGE NoMonomorphismRestriction #-} import qualified Text.Parsec.Token as P import
I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this: - First type
I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this: This is the
I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this: this is the
I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input and get a HTML output.
All of the parsers in Text.Parsec.Token politely use lexeme to eat whitespace after a
I'm trying to parse some Text with parsec: data Cmd = LoginCmd String |
I'm using java.text.SimpleDateFormat to parse string representations of date/time values inside an XML document.
I know I already have the Haskell Data.ByteString.Lazy function to split a CSV on
I'm trying to get this trivial parsec code to compile import Text.Parsec simple =

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.