Giter Site home page Giter Site logo

elm-weather-exercise's Introduction

Hi there ๐Ÿ‘‹

๐Ÿ“ซ How to reach me:

GitHub Twitter LinkedIn GitHub Sponsors

elm-weather-exercise's People

Contributors

dvddix avatar guumaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

elm-weather-exercise's Issues

ELM 0.18

Try to port this code to elm 0.18 but I need help...

First update which seems to be OK :
-- Decode.object6 WeatherInfo
-- ("id" := Decode.int)
-- ("name" := Decode.string)
-- ("sys" := (Decode.at [ "country" ] Decode.string))
-- ("main" := (Decode.at [ "temp" ] Decode.float))
-- ("weather" := (Decode.at [ "0", "description" ] Decode.string))
-- ("weather" := (Decode.at [ "0", "icon" ] Decode.string))
Decode.map6 WeatherInfo
(at ["id"] int)
(at ["name"] string)
(at ["sys", "country" ] string)
(at ["main", "temp" ] float)
(at ["weather", "0", "description" ] string)
(at ["weather", "0", "icon" ] string)

Second one but which doesn't succeed due to Task.perform method change in ELM 0.18
-- Http.get decodeWeatherList url |> Task.perform FetchWeatherFail FetchWeatherSuccess

Try this first version :
Http.send FetchWeatherSuccess (Http.get url decodeWeatherList)
Or this second :
Http.get url decodeWeatherList |> Task.perform FetchWeatherSuccess

But there is an error on compilation... according to the type of FetchWeatherSuccess
Can you help me ?
Thanks a lot :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.