[elm-discuss] Re: Type Alias Question

2017-01-06 Thread Wouter In t Velt
My guess is that this has to do with the strange way in which your "Foo" - like in any record type alias - *Foo is at the same time a Type as well as constructor*. So Foo is a type, that you can use in type annotations and signatures, but also a function with the signature "String -> Foo",

[elm-discuss] Type Alias Question

2017-01-06 Thread Travis Whitton
Hi, new to Elm and just playing around. I'm trying to understand why the following doesn't work. > type alias Foo = { bar : String } > type alias Derp = Foo > Foo "bar" { bar = "bar" } : Repl.Foo > Derp "herp" -- NAMING ERROR -- repl-temp-000.elm

[elm-discuss] Re: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
It's actually true, Rupert. Earlier with Josh from daily drips we discovered that adding gives it a place to put the light-dom. I haven't mentioned it yet, because it only works for shady dom if NO shady dom is being used :/ Simply put, the template must look exactly like this . It's not

[elm-discuss] Re: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread 'Rupert Smith' via Elm Discuss
On Friday, January 6, 2017 at 10:12:09 PM UTC, Rupert Smith wrote: > > On Friday, January 6, 2017 at 4:47:02 PM UTC, Birowsky wrote: >> >> Altho we've reached consistency, the `swiper-node` is not being rendered. >> U know how when you hover a dom element in the inspector, it highlights in >>

[elm-discuss] Re: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread 'Rupert Smith' via Elm Discuss
On Friday, January 6, 2017 at 4:47:02 PM UTC, Birowsky wrote: > > Altho we've reached consistency, the `swiper-node` is not being rendered. > U know how when you hover a dom element in the inspector, it highlights in > the render window? Well, hovering on any of the `swiper-node` children, >

[elm-discuss] Re: Task.perform in 0.18?

2017-01-06 Thread OvermindDL1
Ahh, see that there, the return type of `Scroll.toTop` is `Task.Task Dom.Error ()`, this in this case also change `Task.perform` to `Task.attempt`. :-) On Friday, January 6, 2017 at 1:59:06 PM UTC-7, Rex van der Spuy wrote: > > Thanks Overmind! > > I've done as you suggested and removed one

[elm-discuss] Re: Task.perform in 0.18?

2017-01-06 Thread OvermindDL1
Task.perform now takes a task that cannot fail (hence the 'Never' in its type). So I have no clue what your Scroll.toTop call returns as a type, but if it cannot fail (Never on the error condition type) then just remove one of your `(always NoOp)` calls, else change `Task.perform` call into

[elm-discuss] Task.perform in 0.18?

2017-01-06 Thread Rex van der Spuy
Hi Everyone, In upgrading an 0.17 app I ran across this line of code: ``` Task.perform (always NoOp) (always NoOp) (Scroll.toTop "questionsContainer") ``` I understand that `Task.perform` was re-designed with this signature: ``` perform : (a -> msg) -> Task Never a -> Cmd msg ``` But, I

Re: [elm-discuss] Announcing the JSON Survival Kit

2017-01-06 Thread Brian Hicks
Haha, wow, that’s egg on my face! I added that information to Gumroad last night but never saved it, apparently. Fixed now! The PDF is US Letter size (8.5x11 inches). It’s closest to A4. If someone wants to print a paper copy, I’m happy to make a PDF of whatever size you’d prefer. :) On 6

[elm-discuss] Re: Elm events 2017

2017-01-06 Thread 'Rupert Smith' via Elm Discuss
On Friday, January 6, 2017 at 5:56:35 PM UTC, Josh Adams wrote: > > Both of my talks at NDC London in a couple of weeks involve Elm: > http://ndc-london.com/speaker/josh-adams > Just trying to figure out what NDC is about: "About NDC Since its start-up in Oslo 2008, the Norwegian Developers

Re: [elm-discuss] Announcing the JSON Survival Kit

2017-01-06 Thread Eduardo Cuducos
Hi all, I was n doubt if I should or should not buy the book because I couldn't find some extra infos. I bought it anyway. So if anyone is still pondering: - Format: PDF ✔️ ePub ✔️ mobi ✔️ all of them available - Length: the PDF version

[elm-discuss] Intended usage of -- comments (and elm-format)

2017-01-06 Thread Mark Hamburg
What is the intended usage of -- comments in Elm? I'm used to using them as line end comments in other languages and/or lightweight comment lines all to themselves but elm-format tends to respond to them by more radically adjusting the code layout which suggests either that their intended usage

[elm-discuss] Re: How do I open a URL?

2017-01-06 Thread Wouter In t Velt
There is this somewhat dirty hack you could use: Supply a one-liner of javascript to an Elm style attribute. Using `attribute` from the `Html.Attributes` library. You could make your own helper that does the redirect: redirectTo : String -> Attribute msg redirectTo destinationUrl =

[elm-discuss] Re: Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
If anyone's hungry for points, here's a Stack Overflow version: http://stackoverflow.com/q/41510541/592641 -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[elm-discuss] Need help with Polymer inconsistencies with Elm vdom

2017-01-06 Thread Birowsky
Given: swiper = div [] [ node "swiper-node" [ class "block" ] [ div [ id "swiperContainer" ] [ div [ class "swiper-wrapper" ] [ div [ class "swiper-slide", style [ ( "height", "400px" ), ( "background", "gray" ) ] ] [

Re: [elm-discuss] Re: Replacing Json.Decode.customDecoder for new 0.18 code?

2017-01-06 Thread Rex van der Spuy
Thanks Matt, that worked perfectly! I would not have been able to get this working without your help. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[elm-discuss] Announcing the JSON Survival Kit

2017-01-06 Thread Brian Hicks
Hey all! There's a whole lot of people that get stuck on various JSON Decoding situations 'round these parts. Folks aren't shipping their apps because of it. It makes me sad, since the Json.Decode API is so great. Composable functions! Woohoo! Most of the problem seems to be that it's hard to

[elm-discuss] Replacing Json.Decode.customDecoder for new 0.18 code?

2017-01-06 Thread Rex van der Spuy
Hi Everyone, I'm busy bumping some old 0.17 code to 0.18 and ran into a problem I could figure out. I've got these blocks of code that rely on `Json.Decode.customDecoder`: ``` questionsDecoder : Json.Decode.Decoder Questions.Question questionsDecoder = Json.Decode.Pipeline.decode

[elm-discuss] How do I open a URL?

2017-01-06 Thread Tomáš Znamenáček
Hello! I have a text field. When the text field value is committed, I want to process that value, construct a URL from it and navigate away from the app to this URL. How do I do that? This Stack Overflow question asks about the same thing:

[elm-discuss] Retired my handlebars templates.

2017-01-06 Thread 'Rupert Smith' via Elm Discuss
I just retired the handlebars templates that I have been using to render static content - they have now been replaced with Elm views which are rendered server side. The result is not very fast running under Java8+Nashorn, but I am not overly concerned with that; its relatively static content

[elm-discuss] Re: Elm events 2017

2017-01-06 Thread 'Rupert Smith' via Elm Discuss
On Friday, January 6, 2017 at 3:49:08 AM UTC, Michael B wrote: > > I'm the author of elm-events.org. As you can see, it's looking pretty > empty at the moment! > You could add the elm europe conference, assuming it is still on? https://elmeurope.org/ There seems to be small amount of Elm