elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

What is the problem with this snippet? #170

Closed gaborsar closed 7 years ago

gaborsar commented 7 years ago

The following snippet generates the error under it. Can somebody please point me where the error is?

type Format = String

type alias Text = { attributes : Format, text : String }

type alias Image = { attributes : Format, url : String }

type alias Break = { attributes: Format }

type Inline = Text | Image | Break
Detected errors in 1 module.

-- DUPLICATE DEFINITION --------------------------------------------------------

Naming multiple top-level values `Break` makes things ambiguous. When you say
`Break` which one do you want?

8| type alias Break = { attributes: Format }
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Find all the top-level values named `Break` and do some renaming. Make sure the
names are distinct!

-- DUPLICATE DEFINITION --------------------------------------------------------

Naming multiple top-level values `Image` makes things ambiguous. When you say
`Image` which one do you want?

6| type alias Image = { attributes : Format, url : String }
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Find all the top-level values named `Image` and do some renaming. Make sure the
names are distinct!

-- DUPLICATE DEFINITION --------------------------------------------------------

Naming multiple top-level values `Text` makes things ambiguous. When you say
`Text` which one do you want?

4| type alias Text = { attributes : Format, text : String }
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Find all the top-level values named `Text` and do some renaming. Make sure the
names are distinct!
process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

evancz commented 7 years ago

Questions like this are best for the Elm slack http://elmlang.herokuapp.com/

(It's because the record constructor names clash with the union type constructors.)

Please ask there for further clarification or for any other questions like this in the future!