[elm-discuss] Re: programWithFlags for App using elm-mdl

2016-07-29 Thread Robert Walter
A better way to this is to use Maybe_s: main : Program (Maybe Flags) main = App.programWithFlags { init = init , view = view , update = update , subscriptions = subscriptions } init : Maybe Flags -> ( AppState, Cmd Msg ) init maybeFlags = let

[elm-discuss] Re: programWithFlags for App using elm-mdl

2016-07-29 Thread Robert Walter
Oh man, I just found that out as well. Thank you. So, I changed it like so: type alias AppState = { mdl : Material.Model , viewSelected : Int , ... , titleEditable : Bool , refreshEditorContent : Bool } type alias Flags = { viewSelected : Int , ... ,

[elm-discuss] Re: programWithFlags for App using elm-mdl

2016-07-29 Thread Sergey Skrynnikov
Hi Robert, your flags don't have to be of the same type as the model - try modifying your 'init' function to take only your partial state and return (Model, Cmd Msg). пятница, 29 июля 2016 г., 14:14:39 UTC+3 пользователь Robert Walter написал: > > Hello, > > I try to initialize my elm