Compiler issue for unhelpful error messages


I seem to recall that there was a general issue in the compiler repository for reporting unhelpful error messages. Have I remembered it incorrectly? I couldn’t find it.

I guess whether I’m imagining it or not, my question is, where is the best place to report such messages?

Just in case anyone is curious I was trying to a dictionary and got a message that didn’t really point me to the real problem. (I had assumed that the function is map over values, just like but in fact it takes the key as an argument as well, that is it has type k -> a -> b rather than a -> b).

So a kind of minimal example is:

import Dict exposing (Dict)

type Tree
    = Leaf String

dictToTree : Dict String String -> Dict String Tree
dictToTree = Leaf

Which leads to the error:

The 1st argument to `map` is not what I expect:

15| Leaf
This `Leaf` value is a:

    String -> Tree

But `map` needs the 1st argument to be:

    String -> b

Ellie available here:

Maybe you are referring to this repository?

a ha, yes that’s what I was thinking of, I had mis-remembered it as an issue in the compiler repository. Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.