Algorythmis
Algorythmis

Reputation: 672

Module `Html` does not expose `beginnerProgram`

I'm trying to import Html exposing (beginnerProgram), as it is shown there and there, but the compiler doesn't agree : "Module Html does not expose beginnerProgram".

Thanks in advance.

Upvotes: 11

Views: 3373

Answers (2)

BenKoshy
BenKoshy

Reputation: 35731

The above answer is for older versions of ELM. An updated answer is below.

Updated For Elm 0.19:

Add import statement:

import Browser exposing (sandbox)

Use sandbox: Note that we are not using Never - as in old code samples - we are using () instead:

main : Program () Model Msg
main = Browser.sandbox
       { init = initialModel
       , view = view
       , update = update
       }

Works beautifully: and I hope this helps you.

Upvotes: 24

Algorythmis
Algorythmis

Reputation: 672

Solved by importing from Html.App instead of Html.

Upvotes: 3

Related Questions