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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:39:20+00:00 2026-06-11T16:39:20+00:00

I have found the definition for and, on the internet but I couldnt find

  • 0

I have found the definition for and, on the internet but I couldnt find the actual implementation of and. I did search for some sort of prelude haskell file on my computer but it didn’t return anything which could be opened in a text editor.

  • 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-11T16:39:22+00:00Added an answer on June 11, 2026 at 4:39 pm

    You can use Hoogle to search for Haskell functions, like so:

    http://www.haskell.org/hoogle/?hoogle=and

    The function links take you to the library module where the function was defined, and in this case the link for and takes us to here:

    http://hackage.haskell.org/packages/archive/base/latest/doc/html/Prelude.html#v:and

    You then click on the Source link to the right of the function name and it takes you to the source of that function. For the case of and it links us to here:

    http://hackage.haskell.org/packages/archive/base/latest/doc/html/src/GHC-List.html#and

    and                     :: [Bool] -> Bool
    or                      :: [Bool] -> Bool
    #ifdef USE_REPORT_PRELUDE
    and                     =  foldr (&&) True
    or                      =  foldr (||) False
    #else
    and []          =  True
    and (x:xs)      =  x && and xs
    or []           =  False
    or (x:xs)       =  x || or xs
    #endif
    

    You’ll see that and actually has two definitions. One is the Standard Prelude definition, which is only enabled if you compile with the USE_REPORT_PRELUDE flag, and the other is the definition the Prelude is usually compiled with, which is typically more optimized.

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

Sidebar

Related Questions

I have found some jQuery codes for show content with slide effect, but none
I have found already some similar discussion on this, but would like to investigate
Reading some source code, I have found next traits definition: namespace dds { template
I have searched through a lot of folders, but found definition only (in stdio.h)
I've read around quite a bit but haven't found a definitive answer. I have
I have found similar questions to mine, but just not exactly the same. You
I have been doing some research about this and have found a few similar
I have the following scala class definition (found in a paper), modeling categories: trait
I believe I may have found a bug in the Android UI, but I'd
I have searched the web and have found no definitive solution, so here goes:

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.