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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:57:26+00:00 2026-06-04T20:57:26+00:00

Could someone explain to me why the show function on string is not id

  • 0

Could someone explain to me why the show function on string is not id function? For example

show (show 42) will return "\"42\"" what is weird and for me not intitutive.

  • 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-04T20:57:27+00:00Added an answer on June 4, 2026 at 8:57 pm

    show isn’t very useful if it just converts something into an arbitrary string (like toString in Java). It is much more useful if the result is both easy to read and machine-readable, so a common use of show is to produce a serialized representation of the value that you are showing, so that you can read it in again using read, and also, for most implementations of show, so that you can type the string that is shown at a Haskell REPL like ghci and get the deserialized value back.

    So, if you have a string like "42", and show it, you want to get the string "\"42\"", because when you type 42 in ghci (and equivalently using the read function), you get a number, while when you type "42" in ghci, you get the string that you want.

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

Sidebar

Related Questions

Could someone explain this (strange) behavior? Why is the length in the first example
Please could someone explain to me why this regex does not match anything, when
Could someone explain how to use php preg_match to break a string up into
I would be really grateful if someone could explain how to show/ Hide UItoolbar
Could someone explain the steps that one must do to show an Azure application
Could someone explain the following? >>> a = {1} >>> b = {2} >>>
could someone explain me what XOR , (^) does in the fallowing code exaclly
Could someone explain, please, what are the advantages of using AddOwner method in WPF
Could someone explain what I am doing wrong with my classes that my JTabbedPane
Could someone explain to me how can I run my py2exe program, a console

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.