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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:45:40+00:00 2026-06-18T13:45:40+00:00

Here http://en.wikibooks.org/wiki/Haskell/Classes_and_types in section Class inheritance, I read A class can inherit from several

  • 0

Here http://en.wikibooks.org/wiki/Haskell/Classes_and_types in section Class inheritance, I read “A class can inherit from several other classes: just put all the ancestor classes in the parentheses before the =>.”

I am puzzled when “(…)=>” is described as “inheritance”. So far as I can see, it’s simply a class constraint. It merely says that this newly defined class (in the example: Real) applies to types which are already members (have instances for) the listed classes (Num and Ord).

In short, the “(…)=>” seems to me to act like a filter for qualities required of the types for which instances of this class may be created, and does not act to augment either the class or its instances.

Am I missing something? Is there some sense in which the “(…)=>” actually passes something along from “parent” to “child”?

  • 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-18T13:45:42+00:00Added an answer on June 18, 2026 at 1:45 pm

    In practice, this means that all members of the subclass necessarily provide all methods of the superclass.

    So, as in the linked example, we can write a method that requires Eq, but only give it an Ord constraint, and the Eq methods are implied for us.

    (Note that inheritance is probably a terrible term for this, because it carries a lot of associations that don’t make sense in our context. Nonetheless, I figured I might as well explain it.)

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

Sidebar

Related Questions

I'm using the example found here: http://en.wikibooks.org/wiki/OpenGL_Programming/Modern_OpenGL_Tutorial_Text_Rendering_01 The issue is that when I specify
I use naiveBayes (e1071 http://en.wikibooks.org/wiki/Data_Mining_Algorithms_In_R/Classification/Na%C3%AFve_Bayes ) for classifying my data set (Classification class: class
Possible Duplicate: Functional programming: currying I'm reading the free F# Wikibook here: http://en.wikibooks.org/wiki/F_Sharp_Programming There's
As I read here http://www.theserverside.net/tt/articles/showarticle.tss?id=NHibernate for example public class Department { private int id;
From here: http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html In some cases, MySQL can use an index to satisfy an
In php reading from here http://docs.php.net/manual/en/migration54.new-features.php It says, Class member access on instantiation has
Found this here http://sla.ckers.org/forum/read.php?2,15812,page=2 If you copy the title of the question and run
here: http://qt.gitorious.org/qt-creator are the sources for qtCreator 2.5 RC. How can I download them
the tutorial here http://www.edumobile.org/android/android-beginner-tutorials/creating-image-gallery/ teaches how to put images from resources in gallery here's
Fiddle is here - http://jsfiddle.net/ashwyn/a45ha/ HTML here - <div class=parent> <div class=a>Class A</div> <div

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.