Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example gives 'Cannot find type Element' #27

Closed
jackfranklin opened this issue Oct 13, 2015 · 2 comments
Closed

Example gives 'Cannot find type Element' #27

jackfranklin opened this issue Oct 13, 2015 · 2 comments

Comments

@jackfranklin
Copy link

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
Copy link
Owner

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants