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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:04:09+00:00 2026-05-18T04:04:09+00:00

I was reading LYAH . It says I need to explicitly load Control.Monad.Instances to

  • 0

I was reading LYAH. It says I need to explicitly load Control.Monad.Instances to get the following syntax to work:

( ( fmap (+5) ) (+5) ) 4

Why is that? Why if functors are this underlying and unifying technology do I have to explicitly load Control.Monad.Instances to get that functionality. How is (->) implemented without it (or is just hidden and only -> exported)? Why isn’t the use of fmap over function types implemented by default?

  • 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-18T04:04:10+00:00Added an answer on May 18, 2026 at 4:04 am

    There are 3 different concepts involved here. The function type, the Functor type class, and the Functor “instance”. The function type, (->), is built into the language and its existence and implementation are completely unrelated to Functor and fmap. The type class is the specification of the signature of its associated methods. The “instance” is an implementation of that signature.

    So to make your question clearer, I would re-phrase it as “why isn’t the Functor instance for (->) provided in the Prelude?” (the Prelude being the module that’s in scope by default). As it is currently phrased, it doesn’t make a lot of sense.

    The answer to the modified question is simple: the Haskell Report (the official language specification, which is where the Prelude’s interface is specified) doesn’t include it. Arguably it should, but the Haskell language and libraries have evolved a lot since then, and Haskell standards tend to change slowly. In any case, right or wrong, that’s why.

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

Sidebar

Related Questions

I was reading LYAH and read that the Num class isn't a subset of
Reading C++ Templates: The Complete Guide and it says Note that templates cannot be
Reading through the following instruction table manual I see that integer multiplication is often
reading combase.cpp code, I find following: /* We have to ensure that we DON'T
Reading over the documentation about include_once it basically says that the file in question
Reading Apple documentation i found that UIEventTypeMotion is useful only to intercept Shake. It
I am reading through LYAH, and in Chapter 9, I found a curious problem.
Reading through the CKEditor documentation , I see that they have an option to
Reading the following article, I managed to put a legend outside plot. How to
Reading through this MSDN article http://msdn.microsoft.com/en-us/library/dd460648.aspx I'm seeing a claim that MEF doesn't have

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.