In src/Main.elm (though it doesn't really matter):
module Main exposing (..)
main : Program () () ()
main = Platform.worker
{ init = \_ -> ( (), Cmd.none )
, update = \_ -> \_ -> ( (), Cmd.none )
, subscriptions = \_ -> Sub.none }
Output of elm make src/Main.elm:
Dependencies ready!
-- PROBLEM WITH DEPENDENCY NAME --------------------------------------- elm.json
I got stuck while reading your elm.json file. There is something wrong with this
dependency name:
9| "elm\/core": "1.0.5",
^
Package names always include the name of the author, so I am expecting to see
dependencies like "mdgriffith/elm-ui" and "Microsoft/elm-json-tree-view".
I generally recommend finding the package you want on the package website, and
installing it with the elm install command!
Changing:
"elm\/core" -> "elm/core"
"elm\/json" -> "elm/json"
produces instead:
Dependencies ready!
Success! Compiled 1 module.
Main ───> index.html
Elm: 0.19.1
Browser: n/a
Operating System: Tested on Debian Bullseye, Kubuntu 21.10, and Guix
Additional Details
According to RFC 7159 §7, the syntax for JSON strings is:
so the concrete syntax "\/" should parse the same as "/".
I encountered this issue while experimenting with improvements to the support for Elm in Guix (a "purely functional" package manager à la Nix). The (guix build json) library chooses to always escape / using the \/ sequence (even though it is superfluous).
Quick Summary: The
\/
JSON string escape is not parsed correctly inelm.json
files.SSCCE
In
elm.json
:In
src/Main.elm
(though it doesn't really matter):Output of
elm make src/Main.elm
:Changing:
"elm\/core"
->"elm/core"
"elm\/json"
->"elm/json"
produces instead:
Additional Details
According to RFC 7159 §7, the syntax for JSON strings is:
so the concrete syntax
"\/"
should parse the same as"/"
.I encountered this issue while experimenting with improvements to the support for Elm in Guix (a "purely functional" package manager à la Nix). The
(guix build json)
library chooses to always escape/
using the\/
sequence (even though it is superfluous).