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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:48:08+00:00 2026-05-24T09:48:08+00:00

This is a dumb question that’s been bugging me for a bit. Why can’t

  • 0

This is a dumb question that’s been bugging me for a bit. Why can’t I write a newtype with multiple parameters,

newtype A = A Int Int

while the tuple version is just fine?

newtype A = A (Int, Int)

the former is much nicer in things like pattern matching.

  • 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-24T09:48:11+00:00Added an answer on May 24, 2026 at 9:48 am

    newtype A = A Int creates a type isomorphic to Int. That is, it behaves exactly like Int w.r.t. e.g. bottom, but under a different name.

    This is in contrast with data A = A Int which creates a lifted type that behaves differently from Int. There’s another value added that is not in Int: A undefined (which is distinct from undefined::A).

    Now, newtype A = A (Int, Int) creates a type isomorphic to (Int, Int). Which is, incidentally, exactly exactly what data A = A Int Int does.

    So if we admit newtype A = A Int Int as being equivalent to newtype A = A (Int, Int), what do we have? newtype A = A Int Int is equivalent to newtype A = A (Int, Int) which is equivalent to data A = A Int Int.

    newtype A = A Int Int is equivalent to data A = A Int Int (so newtype is redundant in this case), but

    newtype A = A Int is not equivalent to data A = A Int (which is the whole point of having newtype in the first place).

    So we must conclude that newtype A = A Int Int being equivalent to newtype A = A (Int, Int) creates redundancy and inconsistency, and we’re better off not allowing it.

    There’s probably no way to give newtype A = A Int Int some other meaning which is free from these inconsistencies (or else it would be found and used I suppose 😉

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

Sidebar

Related Questions

I apologize that this is a dumb question, but I have been pulling my
I have that this is a dumb question feeling, but here goes ... Can
Apologies if this is a dumb question. In previous ASP.NET projects, I've been using
This feels like a very dumb question that should be obvious to me. ;)
yes i know how silly and dumb this question is, but i have been
this is a dumb question but for some reason i can't figure it out
This is a sequel to my (other) dumb question that I have asked today
I have a feeling this is a dumb question I should have been able
I do accept that this is a dumb question to many of you! First
This is a dumb question and I know the answer is sitting in front

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.