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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:48:07+00:00 2026-06-08T11:48:07+00:00

I am practising from LYAH. phoneBook.hs file contains following code: phoneBook :: [(String, String)]

  • 0

I am practising from LYAH.

phoneBook.hs file contains following code:

phoneBook :: [(String, String)]

While trying to compile the above-mentioned code I am getting following error:

*Main> :load "/home/optimight/phoneBook.hs"
[1 of 1] Compiling Main             ( /home/optimight/phoneBook.hs, interpreted )

/home/optimight/phoneBook.hs:1:1:
    The type signature for `phoneBook' lacks an accompanying binding
Failed, modules loaded: none.

Question added after brano’s answer and subsequent comment to this answer: How do we provide implementation for above-mentioned type signature?

If I add this :

type phoneBook = [(String, String)]

I am getting following error:

Prelude> :load "/home/optimight/phoneBook.hs"
[1 of 1] Compiling Main             ( /home/optimight/phoneBook.hs, interpreted )

/home/optimight/phoneBook.hs:2:6:
    Malformed head of type or class declaration: phoneBook
Failed, modules loaded: none
  • 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-08T11:48:09+00:00Added an answer on June 8, 2026 at 11:48 am

    You need to provide an implementation for phoneBook.

    phoneBook :: [(String, String)] is just the signature.

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

Sidebar

Related Questions

I am running the following code to try and read from a text file.
Hello i'm practising C and i have a little problem with the following code.
While practicing the jxl API, i cant extract details from certain Excel sheet its
I was practising statements and ran into a problem. I'm trying to make it
I'm practising POSIT algorithm in OpenCV, following the tutorial http://opencv.willowgarage.com/wiki/Posit My goal is to
Practicing some C++, I ran into some code from a book. The usage of
I'm practising Django now, and I'm stuck. When I run: >>> from django import
i was practising to create,store and get data's from database, i am successful in
When I run the following code, I get an error. package practicing.io; import java.io.FileInputStream;
Good day! I'm practising materials from Ruby on Rails Tutorial by Michael Hartle. Below

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.