deadfoxygrandpa / elm-test

A unit testing framework for Elm
MIT License
204 stars 21 forks source link

Example gives 'Cannot find type `Element`' #27

Closed jackfranklin closed 8 years ago

jackfranklin commented 8 years ago

Hey,

The first example in the README errors when trying to compile it (Elm 0.15.1). This part in particular:

main : Element
main = runDisplay tests

Leads to the following:

## ERRORS in AppTest.elm #######################################################

-- NAMING ERROR ---------------------------------------------------- AppTest.elm

Cannot find type `Element`

14| main : Element
           ^^^^^^^

I was able to get it working by removing the type annotation, however I don't know enough Elm to be able to figure out what's going wrong - I guess there's a missing import?

deadfoxygrandpa commented 8 years ago

The documentation needs to be updated.

What is going on is that Graphics.Element used to be a default import in every Elm program, but as of Elm 0.15 it isn't. The simplest ways to get this example working again are either remove the type signature (as you did), or to add this line to the imports at the top of the file: import Graphics.Element exposing (..)

Anyway, I am going through the documentation shortly and expect to rewrite it somewhat.

deadfoxygrandpa commented 8 years ago

The documentation has been updated, but there's currently issue #32 which is blocking this from working. We have a fix in the works there and then this will be OK.