# Community BETA for Elm 0.19.1

**URL:** <https://discourse.elm-lang.org/t/community-beta-for-elm-0-19-1/4102>\
**Category:** Request Feedback\
**Created:** [August 5, 2019, 3:46pm UTC](https://discourse.elm-lang.org/t/community-beta-for-elm-0-19-1/4102 "2019-08-05T15:46:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Jess\_Bromley](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/jess_bromley/32/3396_2.png) [@Jess\_Bromley](https://discourse.elm-lang.org/u/Jess_Bromley)\
**Post date:** [August 6, 2019, 10:34am UTC](https://discourse.elm-lang.org/t/community-beta-for-elm-0-19-1/4102/4 "2019-08-06T10:34:10Z")

</div>

In 0.19 I often got an error message of the form “this call produces a `x`, but the type annotation says it should be a `y`” where `x` and `y` were in fact identical!

I eventually worked out that the simplest way this was happening was when I accidentally provided a function instead of the result of that function as an argument to something, _when the answer itself still needed to be a function_. Probably an example explains this better. Under 0.19, the following:

```auto
makeTranslator : String -> String -> String
makeTranslator =
    Debug.todo ""

translator : String -> String
translator =
    makeTranslator

```

produces the error:

> Something is off with the body of the `translator` definition:
> 
> 11| makeTranslator  
> ^^^^^^^^^^^^^^  
> This `makeTranslator` value is a:
> 
> String → String
> 
> But the type annotation on `translator` says it should be:
> 
> String → String

I can confirm that under 0.19.1 I now get a correct error message, namely:

> Something is off with the body of the `translator` definition:
> 
> 11| makeTranslator  
> ^^^^^^^^^^^^^^  
> This `makeTranslator` value is a:
> 
> String → String → String
> 
> But the type annotation on `translator` says it should be:

> String → String
> 
> Hint: It looks like it takes too many arguments. I see 1 extra.

However, when this error is triggered in more complicated code, the provided hint isn’t always appropriate. Consider the following example, which is a reduction of a [real world error](https://discourse.elm-lang.org/t/cryptic-type-error-with-url-parser/2214) I encountered when trying to understand `Url.Parser`…

```auto
type Parser x y
    = Parser x y

string : Parser (String -> a) a
string =
    Debug.todo ""

slash : Parser a b -> Parser b c -> Parser a c
slash =
    Debug.todo ""

test : Parser (String -> String) String
test =
    slash string string

```

Under 0.19 this again produced an incorrect error message of:

> Something is off with the body of the `test` definition:
> 
> 20| slash string string  
> ^^^^^^^^^^^^^^^^^^^  
> This `slash` call produces:
> 
> Parser (String → String) String
> 
> But the type annotation on `test` says it should be:
> 
> Parser (String → String) String

Under 0.19.1 the error message (below) is improved again, however the hint is (in my opinion) now very confusing for someone trying to understand what is going wrong (what takes too many arguments?)…

> Something is off with the body of the `test` definition:
> 
> 20| slash string string  
> ^^^^^^^^^^^^^^^^^^^  
> This `slash` call produces:
> 
> Parser (String → String → String) String
> 
> But the type annotation on `test` says it should be:
> 
> Parser (String → String) String
> 
> Hint: It looks like it takes too many arguments. I see 1 extra.

But that’s just my opinion, possibly others don’t think it so confusing. The error message is still vastly improved over 0.19! 😀

---

_[View the full topic](https://discourse.elm-lang.org/t/community-beta-for-elm-0-19-1/4102)._
