Blog post: Understanding the Design of elm/url

Hey everyone. I’ve written a post to explain how parsers work in elm/url.

Here’s a link to the blog post: Understanding the Design of elm/url: Part 1

As stated in the README of elm/url, “The API in Url.Parser is quite distinctive.” And, from my experience, although I’ve found the API easy to use, it’s been really difficult to understand. So I wrote about it!

If a type like this has ever caused you confusion.

Parser (String -> b) b

This post is for you! I hope you enjoy.

Thank you @dillonkearns and @randomer for reviewing early drafts of the post.


This is a great blog post. Looking forward to the follow up posts. Thanks :pray:

1 Like

Thanks for this insightful post :ok_hand:

Plus I enjoyed the trick of using embedded Gist with markdown content to make a minimal static site/blog :slight_smile: Just think to backup your GH content regularly. You never know when they will close your account :wink:


Hi @john-kelly
As I was going to visit your blog post, REDACTED has given a warning about a malicious site, suggesting not to visit it.
In fact, the url was something else than the one here in discourse, beginning with “chrome-extension:”

I wonder now, whether your blog is infected or my browser?

edit: this post originally included a weird link in REDACTED, and not the link shared by the original post. Removed it in case it’s something weird that other people should not click.

weird. i use github pages to host the site, not sure what caused your issue. i’ll check on the cert for the site, that’s the only thing i could think of to cause that kind of warning

Once again, thanks for writing this blog post. It inspired me to implement the elm/url parser api in Haskell a couple of days ago, just to see if I understood everything correctly. It was a great learning experience. :slightly_smiling_face:

1 Like

thank you so much for your kind words! it’s great to hear you tried it out for yourself.

for anyone who wants an abbreviated example to play with, try this out:

apply value fn = fn value

apply 3 >> apply "ha" : Int -> String -> b
(apply 3 >> apply "ha") String.repeat : String --> "hahaha"

if you can understand that, you can understand elm/url! although only mentioned briefly in the post, this realization was really fun for me.

1 Like

Hi @john-kelly

Here is the same warning from today as I tried again to open the site
Sorry, it’s only in Finnish language but you can see the weird address in the screenshot picture.

Maybe a false positive on F-Secure side. Honestly I’ve never trust such invasive tools. They only protect their shareholders, not their users, IMHO. They’ll never make their way to my own machine.

The weird URL is how chrome displays pages that are bundled with extensions. You can see that it is coming from this extension since its ID matches. I have no insight into why that extension has decided that the blog post is harmful.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.