1,899 questions
0
votes
0
answers
53
views
Why VS Code (or elm) doesn't recoginize the elm codes in the dir unless I open the files?
I am currently developing elm projects with VS Code, and I notice a delayed configuration of VS Code.
For example, in module A, I import module B, but later I call B.xxx, and it prompts me that ...
0
votes
1
answer
53
views
Unsure of why the helper function doesn't render in elm [closed]
So I'm doing a bit of tweaking with elm to become familiar with it, but when trying to make functions for handling the different views of the application, there's a rounte that doesn't work and I can'...
1
vote
1
answer
101
views
Stack overflow in Elm and other Issues
Disclaimer: I asked the same question on reddit (link)
I'm rewriting a Haskell app (used by my students) in Elm to train myself in the language and enable deployment as a static web app for simpler ...
1
vote
1
answer
90
views
Why does Cmd.OfAsync.perform expect 'unit -> 'a' instead of expect 'Message'?
As far as I understand Cmd.OfAsyn.perform has three inputs:
Cmd.OfAsync.perform
asyncFunction // The async function to perform
input // Input to the async function
...
1
vote
1
answer
179
views
Trefle API Request using Elm
I've started with Elm and want to get images from Trefle API when searched for plant but I keep getting the "Could not fetch image" error.
I do use my own access token but I replaced it here ...
3
votes
1
answer
77
views
Is there a way to 'restrict' elm function f : A -> Maybe B into f0 : ProperA -> B without using Debug.todo?
A function f: A -> Maybe B. is given.
Then a function isProper : A -> Bool can be defined by
isProper a =
case f a of
Just _ ->
True
Nothing ->
...
2
votes
1
answer
66
views
Idiomatic way to transform a value by applying a list of functions in Elm [closed]
Given a list of functions that transform a value, what is the most idiomatic way to apply them? Example:
let
transformations = [ String.replace "dogs" "cats"
...
2
votes
1
answer
71
views
Encourage Elm to use optimized batch DOM manipulation method
I've got a view with thousands of items to display. How do I encourage Elm to utilize something more optimized for list of items like document fragment rather than appendChild?
2
votes
1
answer
110
views
How can I add a transition when changing views in Elm?
I have a SPA written with Elm and styled with CSS. When the view changes, a different render function will be called to render the new view. This will also stop rendering the "old" view.
The ...
3
votes
1
answer
122
views
This is not a record, so it has no fields to access?
I have a problem regarding my Elm project. I have this function here, but I have a problem at interval.start and interval.end yielding the error "This is not a record, so it has no fields to ...
1
vote
2
answers
119
views
Html object tag for svg find width
I have
<object
data="${content}"
type="image/svg+xml"
></object>
Where content is a svg.
Currently I am trying to figure this on elm.
object
[ Attr....
2
votes
1
answer
64
views
How can I make WebAudio.param work in Elm?
I'm just getting started with WebAudio in Elm, using hayleigh-dot-dev/elm-web-audio/1.1.1. I got the setup right, have sound, and things seems to work as intended. However, when I started using ...
1
vote
1
answer
130
views
Is there an equivalent "Window: beforeunload event" that can be used in elm programming?
I want to trigger a Browser dialog when the user is about to close the tab or navigate from the current page. I cant find an equivalent "Window: beforeunload event" in elm. The Browser....
2
votes
1
answer
90
views
Decoding a nested list (list of lists with arbitrary depth) recursively
Consider this recursive type definition:
type NestedList a
= Elem a
| SubList (List (NestedList a))
How can I write a decoder in order to decode a JSON list (e.g [1, [[2, [3, 4]], 5], 6, [7, ...
0
votes
1
answer
55
views
dillonkearns/elm-form Library
I started using the dillonkearns/elm-form library in elm. It works well. Is it possible to create a dropdown where you can select multiple options using this library?
Thanks.
I tried modifying the ...