# Learn

**URL:** https://discourse.elm-lang.org/c/learn/6.md

[Latest](https://discourse.elm-lang.org/latest.md) · [Categories](https://discourse.elm-lang.org/categories.md)

---

## [The Learn Category](https://discourse.elm-lang.org/t/the-learn-category/33)

<div class="topic-metadata">

**Author:** [@evancz](https://discourse.elm-lang.org/u/evancz)\
**Replies:** 0\
**Last updated:** [December 1, 2017, 3:33am UTC](https://discourse.elm-lang.org/t/the-learn-category/33 "2017-12-01T03:33:29Z")

</div>

Use this category if you trying to figure something out and want to ask a question. This is a great place for beginners, too! Examples include: Why are there so many arrows in type annotations? How would you create…

---

## [Failing to remove 0.19.2](https://discourse.elm-lang.org/t/failing-to-remove-0-19-2/10885)

<div class="topic-metadata">

**Author:** [@peterjamesward](https://discourse.elm-lang.org/u/peterjamesward)\
**Replies:** 11\
**Last updated:** [August 17, 2026, 4:29pm UTC](https://discourse.elm-lang.org/t/failing-to-remove-0-19-2/10885 "2026-08-17T16:29:48Z")

</div>

One of my old projects fails to work with 0.19.2. I’d like to revert to 0.19.1. If I ‘rm /usr/local/bin/elm’ and ‘rm ~/.elm’ and do a clean install, it still reports as 0.19.2. What must I do for a full removal and cl…

---

## [Elm init results in InternalException (HostCannotConnect "package.elm-lang.org" \[Network.Socket.setSockOpt: unsupported operation (Protocol not available)\])](https://discourse.elm-lang.org/t/elm-init-results-in-internalexception-hostcannotconnect-package-elm-lang-org-network-socket-setsockopt-unsupported-operation-protocol-not-available/10884)

<div class="topic-metadata">

**Author:** [@filipp](https://discourse.elm-lang.org/u/filipp)\
**Replies:** 3\
**Last updated:** [August 16, 2026, 9:01am UTC](https://discourse.elm-lang.org/t/elm-init-results-in-internalexception-hostcannotconnect-package-elm-lang-org-network-socket-setsockopt-unsupported-operation-protocol-not-available/10884 "2026-08-16T09:01:16Z")

</div>

Hi all, Installed elm 0.19.2 (upgraded from 0.19.1), but cannot elm init a new project, resulting in the following error message instead: InternalException (HostCannotConnect “package.elm-lang.org” \[Network.Socket.set…

---

## [Coming back to elm -- a bit confused about current state?](https://discourse.elm-lang.org/t/coming-back-to-elm-a-bit-confused-about-current-state/10860)

<div class="topic-metadata">

**Author:** [@blunderous](https://discourse.elm-lang.org/u/blunderous)\
**Replies:** 4\
**Last updated:** [July 25, 2026, 4:58pm UTC](https://discourse.elm-lang.org/t/coming-back-to-elm-a-bit-confused-about-current-state/10860 "2026-07-25T16:58:38Z")

</div>

Like many of you, I saw the 0.19.2 announcement and was immediately super excited. I haven’t touched elm in years, but was enjoying it immensely somewhere around 2018. It remains far and away the most positive experience…

---

## [Sorry maybe I broke the online editor](https://discourse.elm-lang.org/t/sorry-maybe-i-broke-the-online-editor/10836)

<div class="topic-metadata">

**Author:** [@SilencerHH](https://discourse.elm-lang.org/u/SilencerHH)\
**Replies:** 1\
**Last updated:** [June 30, 2026, 4:23pm UTC](https://discourse.elm-lang.org/t/sorry-maybe-i-broke-the-online-editor/10836 "2026-06-30T16:23:30Z")

</div>

I was playing around with Elm’s type inference in Try Elm!. I won’t describe what I did to prevent someone repeating it but it kept replying 502 Bad Gateway since then. Really sorry​:sob:

---

## [A Defense of eco and of my character](https://discourse.elm-lang.org/t/a-defense-of-eco-and-of-my-character/10801)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 7\
**Last updated:** [June 29, 2026, 6:24pm UTC](https://discourse.elm-lang.org/t/a-defense-of-eco-and-of-my-character/10801 "2026-06-29T18:24:12Z")

</div>

Eco is an independently developed Elm compiler project with its own architecture, implementation history and technical objectives. Some similarities have been drawn between Eco and other projects in the Elm ecosystem, p…

---

## [Elm PWA installation](https://discourse.elm-lang.org/t/elm-pwa-installation/10785)

<div class="topic-metadata">

**Author:** [@AlanQ](https://discourse.elm-lang.org/u/AlanQ)\
**Replies:** 4\
**Last updated:** [June 23, 2026, 7:05pm UTC](https://discourse.elm-lang.org/t/elm-pwa-installation/10785 "2026-06-23T19:05:48Z")

</div>

Background Having got close to completing an Elm app to launch to the world, I decided to investigate how to prompt users to install it. I had naively assumed that the process for accessing various system services — us…

---

## [Prerequisite knowledge for building Elm's type-system](https://discourse.elm-lang.org/t/prerequisite-knowledge-for-building-elms-type-system/10729)

<div class="topic-metadata">

**Author:** [@TerrorJacktyl](https://discourse.elm-lang.org/u/TerrorJacktyl)\
**Replies:** 3\
**Last updated:** [May 28, 2026, 7:22am UTC](https://discourse.elm-lang.org/t/prerequisite-knowledge-for-building-elms-type-system/10729 "2026-05-28T07:22:10Z")

</div>

TL;DR: What knowledge would be sufficient to prototype Elm’s type-system if you were building it yourself today? There are plenty of resources for developing new programming languages, but not so many I’ve seen for devel…

---

## [Static JSON to Elm at Compiletime](https://discourse.elm-lang.org/t/static-json-to-elm-at-compiletime/10652)

<div class="topic-metadata">

**Author:** [@dillon.geary](https://discourse.elm-lang.org/u/dillon.geary)\
**Replies:** 4\
**Last updated:** [May 19, 2026, 12:03pm UTC](https://discourse.elm-lang.org/t/static-json-to-elm-at-compiletime/10652 "2026-05-19T12:03:41Z")

</div>

I’m in the process of updating my porfolio site and was thinking “how good would it be if i could just update a JSON file when i need to change it instead of going into the code itself”. So naturally, i looked into JSON …

---

## [Delete button with confirmation](https://discourse.elm-lang.org/t/delete-button-with-confirmation/10628)

<div class="topic-metadata">

**Author:** [@setop](https://discourse.elm-lang.org/u/setop)\
**Replies:** 6\
**Last updated:** [May 17, 2026, 6:28pm UTC](https://discourse.elm-lang.org/t/delete-button-with-confirmation/10628 "2026-05-17T18:28:33Z")

</div>

For an application, I want to add a confirmation dialog to a delete button in order to prevent my users from “oups ! I lost data”. I want something very basic using native web browser window.confirm. I came across this…

---

## [Agentic Scaffolding and Harnesses... continued](https://discourse.elm-lang.org/t/agentic-scaffolding-and-harnesses-continued/10623)

<div class="topic-metadata">

**Author:** [@nickwalt](https://discourse.elm-lang.org/u/nickwalt)\
**Replies:** 7\
**Last updated:** [May 14, 2026, 4:40am UTC](https://discourse.elm-lang.org/t/agentic-scaffolding-and-harnesses-continued/10623 "2026-05-14T04:40:52Z")

</div>

Continued from: Personal AI Infrastructure (PAI) and Devpod CE - #11 by rupert I found more on this blog, by Bas Nijholt, about his journey into Agentic coding, which might add to the discussion started about PAI and De…

---

## [Does anyone have examples of more advanced SPA architecture than the ones in the guide?](https://discourse.elm-lang.org/t/does-anyone-have-examples-of-more-advanced-spa-architecture-than-the-ones-in-the-guide/10614)

<div class="topic-metadata">

**Author:** [@adamyakes](https://discourse.elm-lang.org/u/adamyakes)\
**Replies:** 7\
**Last updated:** [April 29, 2026, 2:52pm UTC](https://discourse.elm-lang.org/t/does-anyone-have-examples-of-more-advanced-spa-architecture-than-the-ones-in-the-guide/10614 "2026-04-29T14:52:42Z")

</div>

I’ve used (read: stolen) the architecture from elm-spa-example and Elm packages repository for the apps I write at work and it’s worked really well, however I’m trying to introduce some new features that require cross-pa…

---

## [If Elm had threads..?](https://discourse.elm-lang.org/t/if-elm-had-threads/10602)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 31\
**Last updated:** [April 18, 2026, 9:49pm UTC](https://discourse.elm-lang.org/t/if-elm-had-threads/10602 "2026-04-18T21:49:48Z")

</div>

There is this intriguing snippet in the docs for elm/core Process: Right now, this library is pretty sparse. For example, there is no public API for processes to communicate with each other. This is a really important …

---

## [Elm ”best practices” in 2026](https://discourse.elm-lang.org/t/elm-best-practices-in-2026/10592)

<div class="topic-metadata">

**Author:** [@datakurre](https://discourse.elm-lang.org/u/datakurre)\
**Replies:** 7\
**Last updated:** [April 1, 2026, 9:34pm UTC](https://discourse.elm-lang.org/t/elm-best-practices-in-2026/10592 "2026-04-01T21:34:09Z")

</div>

Hi! LLM / agent era brought myself back to Elm, finally (no runtime errors, beautiful readable code, awesome compiler errors, stable language…). I love to see that Elm is still there and I see enough activity on importa…

---

## [Elm-ui clip in Firefox](https://discourse.elm-lang.org/t/elm-ui-clip-in-firefox/10593)

<div class="topic-metadata">

**Author:** [@AlanQ](https://discourse.elm-lang.org/u/AlanQ)\
**Replies:** 2\
**Last updated:** [March 31, 2026, 7:35pm UTC](https://discourse.elm-lang.org/t/elm-ui-clip-in-firefox/10593 "2026-03-31T19:35:54Z")

</div>

Using the elm-ui clip attribute in Firefox (and Firefox derivatives) clips (removes) the entire element! Others must have noticed this but has anyone investigated why, plus workarounds? No need for a minimum working ex…

---

## [\`elm-ui\` off-ramp?](https://discourse.elm-lang.org/t/elm-ui-off-ramp/10581)

<div class="topic-metadata">

**Author:** [@adamyakes](https://discourse.elm-lang.org/u/adamyakes)\
**Replies:** 0\
**Last updated:** [March 20, 2026, 4:51pm UTC](https://discourse.elm-lang.org/t/elm-ui-off-ramp/10581 "2026-03-20T16:51:32Z")

</div>

Does anyone have experience doing an off-ramp from elm-ui? Our applications have been built with it and usually have ~5 main pages each. elm-ui has been great, and truly is an accelerator in UI development, but we’re run…

---

## [Is Elm a great language for AI to code in?](https://discourse.elm-lang.org/t/is-elm-a-great-language-for-ai-to-code-in/10575)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 20\
**Last updated:** [March 16, 2026, 10:25am UTC](https://discourse.elm-lang.org/t/is-elm-a-great-language-for-ai-to-code-in/10575 "2026-03-16T10:25:12Z")

</div>

I am writing an article about what makes a good language for AI to program in and why, and also trying to make a case for Elm as being a strong candidate here. There is also definitely a big overlap between what is good …

---

## [Untyped Elm Programs (oh no not again!)](https://discourse.elm-lang.org/t/untyped-elm-programs-oh-no-not-again/10578)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 0\
**Last updated:** [March 12, 2026, 12:10pm UTC](https://discourse.elm-lang.org/t/untyped-elm-programs-oh-no-not-again/10578 "2026-03-12T12:10:47Z")

</div>

Topic is closed, so creating a new thread… testValue : List a testValue = let process xs = case xs of \[\] -\> \[\] nonEmpty -\> transform nonEmpty transform xs = proce…

---

## [Can an Elm program ever be untyped?](https://discourse.elm-lang.org/t/can-an-elm-program-ever-be-untyped/10548)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 26\
**Last updated:** [February 26, 2026, 2:36pm UTC](https://discourse.elm-lang.org/t/can-an-elm-program-ever-be-untyped/10548 "2026-02-26T14:36:49Z")

</div>

Elm has polymorphism, but we usually cannot create polymorphic values. An example: foldr : (a -\> b -\> b) -\> b -\> List a -\> b To call this, I need a list of something: foldr (\\w acc -\> w ++ " " ++ acc) "" \["words", "to…

---

## [Any way to set the \<html\> element "lang" attribute from Elm?](https://discourse.elm-lang.org/t/any-way-to-set-the-html-element-lang-attribute-from-elm/10532)

<div class="topic-metadata">

**Author:** [@Tapio\_Peltonen](https://discourse.elm-lang.org/u/Tapio_Peltonen)\
**Replies:** 1\
**Last updated:** [January 22, 2026, 5:20pm UTC](https://discourse.elm-lang.org/t/any-way-to-set-the-html-element-lang-attribute-from-elm/10532 "2026-01-22T17:20:41Z")

</div>

WCAG guidelines state that the html element must have a “lang” attribute that specifies the main language used in the web page. It is possible to set it dynamically from Javascript, but I did not find a way to set it fro…

---

## [What 'https with certificate' local test server do others use?](https://discourse.elm-lang.org/t/what-https-with-certificate-local-test-server-do-others-use/10499)

<div class="topic-metadata">

**Author:** [@AlanQ](https://discourse.elm-lang.org/u/AlanQ)\
**Replies:** 19\
**Last updated:** [December 29, 2025, 10:47pm UTC](https://discourse.elm-lang.org/t/what-https-with-certificate-local-test-server-do-others-use/10499 "2025-12-29T22:47:45Z")

</div>

Background I developed backup and restore for my app. While testing I found that it was difficult to persuade some browsers to access files for the restore process. I decided to tackle the browser trust issue before i…

---

## [Do you put database IDs in your records?](https://discourse.elm-lang.org/t/do-you-put-database-ids-in-your-records/10501)

<div class="topic-metadata">

**Author:** [@adamyakes](https://discourse.elm-lang.org/u/adamyakes)\
**Replies:** 16\
**Last updated:** [December 24, 2025, 8:58am UTC](https://discourse.elm-lang.org/t/do-you-put-database-ids-in-your-records/10501 "2025-12-24T08:58:19Z")

</div>

I’m using Elm on the frontend and ASP.NET in F# on the backend. They work pretty well together, and it’s been quite nice to create the same data structures (i.e. records) in both languages that both support unions and re…

---

## [Does the guide ever explain \`let\`?](https://discourse.elm-lang.org/t/does-the-guide-ever-explain-let/10509)

<div class="topic-metadata">

**Author:** [@adamyakes](https://discourse.elm-lang.org/u/adamyakes)\
**Replies:** 3\
**Last updated:** [December 19, 2025, 11:00am UTC](https://discourse.elm-lang.org/t/does-the-guide-ever-explain-let/10509 "2025-12-19T11:00:44Z")

</div>

Someone on my team asked a syntax question about let and I wanted to point them to the guide, but I searched through and I actually can’t find a single reference to it. This seems like a pretty big gap to me, i.e. “How t…

---

## [Elm connection timeout while downloading packages](https://discourse.elm-lang.org/t/elm-connection-timeout-while-downloading-packages/10506)

<div class="topic-metadata">

**Author:** [@mihkel](https://discourse.elm-lang.org/u/mihkel)\
**Replies:** 2\
**Last updated:** [December 11, 2025, 5:48pm UTC](https://discourse.elm-lang.org/t/elm-connection-timeout-while-downloading-packages/10506 "2025-12-11T17:48:05Z")

</div>

I’ve been using Elm on DigitalOcean for 4 years and suddenly I get erros while downloading some packages. I’ve talked with DigitalOcean support but they are telling me to stop trying downloading json and that I should d…

---

## [Could ES6 modules improve caching?](https://discourse.elm-lang.org/t/could-es6-modules-improve-caching/10500)

<div class="topic-metadata">

**Author:** [@adamyakes](https://discourse.elm-lang.org/u/adamyakes)\
**Replies:** 5\
**Last updated:** [December 10, 2025, 9:37pm UTC](https://discourse.elm-lang.org/t/could-es6-modules-improve-caching/10500 "2025-12-10T21:37:56Z")

</div>

I was perusing List of all Elm kernel functions and saw some discussion on ES6 modules. I got and agreed with the general consensus that it would not improve Elm today as Elm has its own module system, and that there are…

---

## [Learning WebGL with Elm!](https://discourse.elm-lang.org/t/learning-webgl-with-elm/10493)

<div class="topic-metadata">

**Author:** [@SabeDoesThings](https://discourse.elm-lang.org/u/SabeDoesThings)\
**Replies:** 2\
**Last updated:** [November 28, 2025, 2:09pm UTC](https://discourse.elm-lang.org/t/learning-webgl-with-elm/10493 "2025-11-28T14:09:07Z")

</div>

Hello! I’ve started learning Elm a few days ago and I’m wanting to use it with WebGL but I’m not really sure how to use WebGL. I’ve looked at a few examples and have been looking through them and slowly learning but does…

---

## [List of all Elm Cmd, Task and Sub?](https://discourse.elm-lang.org/t/list-of-all-elm-cmd-task-and-sub/10491)

<div class="topic-metadata">

**Author:** [@rupert](https://discourse.elm-lang.org/u/rupert)\
**Replies:** 1\
**Last updated:** [November 26, 2025, 7:09am UTC](https://discourse.elm-lang.org/t/list-of-all-elm-cmd-task-and-sub/10491 "2025-11-26T07:09:26Z")

</div>

Further to my sheet with a list of all kernel functions, somebody must have created a list of all Cmd, Sub and Task exposed by the entire elm/\* and elm-explorations/\* API? If so, I would like to add it to the sheet.

---

## [How to exclude files from being watched by elm-live](https://discourse.elm-lang.org/t/how-to-exclude-files-from-being-watched-by-elm-live/10477)

<div class="topic-metadata">

**Author:** [@halloleo](https://discourse.elm-lang.org/u/halloleo)\
**Replies:** 4\
**Last updated:** [November 4, 2025, 11:51pm UTC](https://discourse.elm-lang.org/t/how-to-exclude-files-from-being-watched-by-elm-live/10477 "2025-11-04T23:51:44Z")

</div>

I use elm-live to serve my Elm, app in development. I run it like this: elm-live src/Main.elm -d site -- --output=site/index.html This works fine - until I create (via my editor Emacs) arbitrary backup file to some of…

---

## [Elm program test with model](https://discourse.elm-lang.org/t/elm-program-test-with-model/10476)

<div class="topic-metadata">

**Author:** [@Gwendal\_Fernet](https://discourse.elm-lang.org/u/Gwendal_Fernet)\
**Replies:** 0\
**Last updated:** [November 3, 2025, 7:33am UTC](https://discourse.elm-lang.org/t/elm-program-test-with-model/10476 "2025-11-03T07:33:16Z")

</div>

Hello, I’m building an SPA where all my data are saved in SQLite wasm in JavaScript. I use the effect pattern as in elm-realworld-example-app/src/Page/Profile.elm at master · dmy/elm-realworld-example-app · GitHub How …

---

## [How to set the \`title\` metadata field?](https://discourse.elm-lang.org/t/how-to-set-the-title-metadata-field/10470)

<div class="topic-metadata">

**Author:** [@halloleo](https://discourse.elm-lang.org/u/halloleo)\
**Replies:** 8\
**Last updated:** [October 22, 2025, 12:11am UTC](https://discourse.elm-lang.org/t/how-to-set-the-title-metadata-field/10470 "2025-10-22T00:11:43Z")

</div>

How can I set the title metadata field of webapp? I have written a little webapp with Elm which worked out very nicely. The elm code compiles to a single index.html file which is exactly what I want. However in this ind…

[Next page](https://discourse.elm-lang.org/c/learn/6.md?page=1)
