rtfeldman / elm-in-action

Resources for the Elm In Action book.
166 stars 33 forks source link

Ambiguous name issue #25

Open kantuni opened 3 months ago

kantuni commented 3 months ago

In Chapter 5 (section 5.1.1) it says

Ambiguous name

If we try build this code, we'll get a compile error. max is ambiguous. It's being exposed by both of these modules:

  • Basics
  • Html.Attributes

This is only true, if we have

import Html.Attributes exposing (..)

although in the previous chapter we ended with

import Html.Attributes exposing (class, classList, id, name, src, title, type_)

But the updated import introduces another compiler error since now required becomes ambiguous (Html.Attributes.required vs Json.Decode.Pipeline.required)

We need to update all instances of required to Json.Decode.Pipeline.required to make the compiler happy.