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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:41:32+00:00 2026-06-06T07:41:32+00:00

I have been using Haskell for quite a while. The more I use it,

  • 0

I have been using Haskell for quite a while. The more I use it, the more I fall in love with the language. I simply cannot believe I have spent almost 15 years of my life using other languages.

However, I am slowly but steadily growing fed up with Haskell’s standard libraries. My main pet peeve is the “not polymorphic enough” definitions (Prelude.map, Control.Monad.forM_, etc.). I have a lot of Haskell source code files whose first lines look like

{-# LANGUAGE NoMonomorphismRestriction #-}

module Whatever where

import Control.Monad.Error hiding (forM_, mapM_)
import Control.Monad.State hiding (forM_, mapM_)
import Data.Foldable (forM_, mapM_)

{- ... -}

In order to avoid constantly hoogling which definitions I should hide, I would like to have a single or a small amount of source code files that wrap this import boilerplate into manageable units.

So…

  1. Has anyone else tried doing this before?
  2. If the answer to the previous question is “Yes”, have they posted the resulting boilerplate-wrapping source code files?
  • 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-06T07:41:33+00:00Added an answer on June 6, 2026 at 7:41 am

    It is not as clear cut as you imagine it to be. I will list all the disadvantages I can think of off the top of my head:

    First, there is no limit to how general these functions can get. For example, right now I am writing a library for indexed types that subsumes ordinary types. Every function you mentioned has a more general indexed equivalent. Do I expect everybody to switch to my library for everything? No.

    Here’s another example. The mapM function defines a higher order functor that satisfies the functor laws in the Kleisli category:

    mapM return = return
    mapM (f >=> g) = mapM f >=> mapM g
    

    So I could argue that your traversable generalization is the wrong one and instead we should generalize it as just being an instance of a higher order functor class.

    Also, check out the category-extras package for some examples of these higher order classes and functions which subsume all your examples.

    There is also the issue of performance. Many of thesr more specialized functions have really finely tuned implementations that dramatically help performance. Sometimes classes expose ways to admit more performant versions, but sometimes they don’t.

    There is also the issue of typeclass overload. I actually prefer to minimize use of typeclasses unless they have sound laws derived from theory rather than convenience. Also, typeclasses generally play poorly with the monomorphism restriction and I enjoy writing functions without signatures for my application code.

    There is also the issue of taste. A lot of people simply don’t agree what is the best Haskell style. We still can’t even agree on the Prelude. Speaking of which, there have been many attempts to write new Preludes, but nobody can agree on what is best so we all default back to the Haskell98 one anyway.

    However, I think the overall spirit of improving things is good and the worst enemy of progress is satisfaction, but don’t assume there will be a clear-cut right way to do everything.

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

Sidebar

Related Questions

I have been using this copy method for quite a while, in lots of
I have been using jQuery for a while. I wanted to use the parent()
We have been using CruiseControl for quite a while with NUnit and NAnt. For
I have been using the CodeIgniter system for a while now - but it
I have been using HTML4 for quite some time. I've heard of HTML5 for
I have been using this script for a while and suddenly it just stopped
I have been using Javassist to dynamically manipulate classes as they are loaded. While
I have been using Javascript but more in a procedural way not the object
I have been using mySQL Quite a bit however, this is the first time
I have been playing with creating a fully typed DSEL in Haskell using GADTs

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.