I've been beating my head against a wall trying to integrate Elm into my
companies build system. Whether its getting haskell running at all, getting
the right version of glibc to execute the elm binaries or hacking the
elm-stuff folder to fake private repos, I'm hitting walls at every turn. To
On Tuesday, 27 December 2016 05:37:43 UTC+7, Robin Heggelund Hansen wrote:
>
> Part I: Evan is already aware of this issue, you can see the full
> discussion in this github issue:
> https://github.com/elm-lang/elm-compiler/issues/1528
> The short of it is that the code generator part of the com
Part I: Evan is already aware of this issue, you can see the full
discussion in this github
issue: https://github.com/elm-lang/elm-compiler/issues/1528
The short of it is that the code generator part of the compiler is not
aware of type information, and adding this would be a serious undertaking
Got it like this:
decodeNotes : Decoder (List DailyNotes)
decodeNotes =
list (field "day_entry" decodeDailyNotes)
decodeDailyNotes : Decoder DailyNotes
decodeDailyNotes =
map2 DailyNotes
(field "id" int)
(maybe (field "notes" string))
Didn't use type alias
Actually I don't need:
type alias Notes =
{ dailyNotes : List DailyNotes
}
Am Montag, 26. Dezember 2016 21:31:45 UTC+1 schrieb Sekib Omazic:
>
> Hi all,
>
> I got stuck trying to decode a list of JSON objects I get from server:
>
> -- JSON response from server
>
> [
> {"day_entry": {"i
Hi all,
I got stuck trying to decode a list of JSON objects I get from server:
-- JSON response from server
[
{"day_entry": {"id":1234,"notes":"Map Json "} },
{"day_entry": {"id":5678,"notes":"Learn Elm"} }
]
-- types
type alias Notes =
{ dailyNotes : List DailyNotes
}
type alias
*Synopsis:* Some, including Evan, maintain that Elm can be "faster than
JavaScipt". While that may be true for some use cases including use of
perhaps more efficient UI updates due to compartmentalized use of
VirtualDOM, the actaul Javascript code generated by the compiler is not
very effic
Hello, the answer depends a bit on what you intend to do with the Bools
after you have them...
But if, as you describe, you just want to end up with a List of Bools, then
List.map (\r -> r.age >= 21) yourRecords
But I expect you may also be interested in one of `List.filter`,
`List.all`, or
Hi Alex,
Perhaps this helps?
$ elm repl
elm-repl 0.17.1
---
:help for help, :exit to exit, more at <
https://github.com/elm-lang/elm-repl>
> a = [1, 2, 3,
Hello,
I am new to elm syntax. I have a list of records with name and age. I want
to apply a test function to each record. The function takes one record as
input and returns a boolean value. Depending on True or false, I want to
take a specific action for each record. How can I implement this in
10 matches
Mail list logo