molleweide

molleweide

Effective Haskell: ch 2 > destructuring lists

  1. The function I am testing is handleNums on page 68.

It returns this error message:

    λ: :reload
    [1 of 1] Compiling Main             ( Chapter2.hs, interpreted )

    Chapter2.hs:306:1: error:
        • Non type-variable argument
            in the constraint: Show ((a -> Bool) -> Bool)
          (Use FlexibleContexts to permit this)
        • When checking the inferred type
            handleNums :: forall a.
                          (Integral a, Show ((a -> Bool) -> Bool), Num ((a -> Bool) -> Bool),
                           Eq ((a -> Bool) -> Bool)) =>
                          [(a -> Bool) -> Bool] -> [Char]
        |
    306 | handleNums l =
        | ^^^^^^^^^^^^^^...
    Failed, no modules loaded.
  1. I sort of understand the err msg but I add this info here so you can see that this can happen to a reader.

  2. Did I post this information under the correct category. Is “errata” correct or should I have chose something else?

  3. The book is great! I’m chugging along and it feels really good.

First Post!

RebeccaSkinner

RebeccaSkinner

Author of Effective Haskell

Hi! Can you share the code that you are trying to load. I can’t reproduce this error from the example locally.

Popular Pragmatic Bookshelf topics Top

yulkin
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
jamis
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
lirux
Hi Jamis, I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019. This test doesn’t pass for me: ...
New
raul
Hi Travis! Thank you for the cool book! :slight_smile: I made a list of issues and thought I could post them chapter by chapter. I’m rev...
New
joepstender
The generated iex result below should list products instead of product for the metadata. (page 67) iex> product = %Product{} %Pento....
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
jwandekoken
Book: Programming Phoenix LiveView, page 142 (157/378), file lib/pento_web/live/product_live/form_component.ex, in the function below: d...
New
redconfetti
Docker-Machine became part of the Docker Toolbox, which was deprecated in 2020, long after Docker Desktop supported Docker Engine nativel...
New

Other popular topics Top

siddhant3030
I’m thinking of buying a monitor that I can rotate to use as a vertical monitor? Also, I want to know if someone is using it for program...
New
brentjanderson
Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
New
PragmaticBookshelf
Author Spotlight: VM Brasseur @vmbrasseur We have a treat for you today! We turn the spotlight onto Open Source as we sit down with V...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New

Latest in Effective Haskell

Effective Haskell Portal