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

  • SEARCH
  • Home
  • 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 8027385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:47:45+00:00 2026-06-04T23:47:45+00:00

I have heard there is a branch of GHC that compiles to strict code

  • 0

I have heard there is a branch of GHC that compiles to strict code by default whereas laziness can be enabled by annotation. (IIRC, he said a financial company develops the branch and uses it for production code.) Is that true? I can’t find it.

The person also suggested that the opinion that strict evaluation is more practical than lazy evaluation (by default) gains acceptance more and more.
I don’t find this confirmed in the Haskell mailing list, but maybe that is because people there are not that practice-oriented?

All I find on strict Haskell are explicit things like $! and rnf. While I find lazy evaluation very elegant, I’d like to develop a a program in Haskell where I want to avoid space leaks and would like to have predictable performance.

Disclaimer: I’m not making a case for strictness, I’d just like to have a look at strict Haskell or something like that.

  • 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-06-04T23:47:47+00:00Added an answer on June 4, 2026 at 11:47 pm

    You’re looking for Disciple.

    So there are two kinds of laziness to distinguish in Haskell. There’s lazy I/O, which is an abomination and is solved by iteratee libraries (Shameless plug: including my pipes library). Then there’s laziness in pure computations, which is still open to debate, but I’ll try to summarize the key advantages of laziness since you are already familiar with the disadvantage:

    Laziness is more efficient

    A simple example is:

    any = foldr (||) False
    

    any finds if any value in a list is True. This only evaluates the elements up to the first True, so it doesn’t matter if the list is very long.

    Laziness only computes as much as it has to, meaning that if you chain together two lazy computations, it can actually improve the time complexity of the resulting computation. This Stack Overflow comment gives another good example of this.

    This is actually the same reason why iteratee libraries are very resource-efficient. They only do as much work as they have to generate results, and this leads to very efficient memory and disk usage with very easy-to-use semantics.

    Laziness is inherently more composable

    This is well known by people who have programmed in both strict and functional languages, but I actually inadvertently demonstrated a limited proof of this while working on the pipes library, where the lazy version is the only version that permits a Category instance. Pipes actually work in any monad, including the pure Identity monad, so my proofs translate to pure code as well.

    This is the true reason why I believe that laziness in general is really the future of programming, however I still think that it’s an open question of whether or not Haskell implemented laziness “right”.

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

Sidebar

Related Questions

I have heard that when dealing with mutexes, the necessary memory barriers are handled
I have heard that in C++, using an accessor ( get...() ) in a
I have heard it many times that garbage collection in PyS60 is not up
I have heard that web-based chat clients tend to use networking frameworks such as
I have a local branch that is tracking of a remote branch on git.
In master I have some files that should better live in a feature branch.
I have a git branch (called v4), that was made from master just yesterday.
I have a local branch A that's branched from origin/master that I frequently rebase,
I don't understand svn merge. Here's the scenario: We have a branch that contains
I have a slightly outdated experimental branch, that was pushed aside due to time

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.