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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:43:22+00:00 2026-05-27T02:43:22+00:00

In this tutorial , at the very bottom, the author provides a function type

  • 0

In this tutorial, at the very bottom, the author provides a function type of:

(Num b) => length :: [a] -> b

So you can see that it begins with typeclass "Num b" (at least that’s what I think it is). But when I try to define something like:

(Integral a) => lucky :: a -> String

I get an error:

parse error on input `=>’

Who is wrong here?

  • 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-27T02:43:23+00:00Added an answer on May 27, 2026 at 2:43 am

    The tutorial is wrong, the type class has to come after the ::, the type signature ought to be length :: Num b => [a] -> b.

    The syntax is specified in the language report, section 10.5 context free syntax, the pertinent production is gendecl.

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

Sidebar

Related Questions

I am taking this tutorial. As you can see on this image, the standard
In this tutorial I am reading , Dave Ward creates a page that shows
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I have followed this tutorial which allowed me to create a Silverlight DataGrid that
I was going through this tutorial for fun, and got stuck on the very
I try to learn symfony by this tutorial And is very good guide. But
I've been watching this tutorial http://windowsclient.net/learn/video.aspx?v=296114 . At the very begining empty Windows forms
I'm trying to make the flip-clock animation, I find this tutorial very interesting http://www.voyce.com/index.php/2010/04/10/creating-an-ipad-flip-clock-with-core-animation/
i finished this tutorial: http://dblog.com.au/iphone-development/iphone-sdk-tutorial-build-your-very-own-web-browser/ and now i want to add a function for

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.