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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:06:50+00:00 2026-05-27T11:06:50+00:00

class (Eq e, GenExpr e, MonadRandom m) => GenProg m e | e ->

  • 0
class (Eq e, GenExpr e, MonadRandom m) => GenProg m e | e -> m where

Excactly, I can’t understand this GenProg m e | e -> m

I guess GenProg is a constructor.

does that means: the one whose pattern matched GenProg m e or e -> m, whose instance can be defined ?

by the way, where can i get all syntax in haskell?

  • 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-27T11:06:50+00:00Added an answer on May 27, 2026 at 11:06 am

    It’s a multiparameter type class with a functional dependency. GenProg is the name of the class, the two parameters are m (which has to be an instance of MonadRandom) and e (which has to be an instance of Eq and GenExpr). Then the | separates the instance head from the functional dependency e -> m, which says that the type e in an instance determines the type constructor m, in other words, for any type e there can be at most one m such that an

    instance GenProg m e where ...
    

    appears in a valid programme. (I.e., if there is more than one such instance declaration with the same e, there will be a compilation error.)

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

Sidebar

Related Questions

Class is a reference types while Struct is a value type. This means that
class token { private: char m_chIcon; //actual ascii char that shows up for this
Class A calls the public method f() in the Constructor. Class B overrides method
How exactly does Python evaluate class attributes? I've stumbled across an interesting quirk (in
class base{ public $c = 'c'; public $sub = ''; function __construct(){ $this->sub =
class Foo { const MY_CONST = 'this is ' . 'data' ; //use of
class LinkedList{ private $first; public function Merge(LinkedList $ll){ //We can't access $ll->first for merging
class MyClass { var $lambda; function __construct() { $this->lambda = function() {echo 'hello world';};
class MyClass: def myFunc(self): pass Can I create MyFunc() outside of the class definition,
class Base { public: virtual void func() const { cout<<This is constant base <<endl;

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.