I’m currently using Elm to develop a mobile application. In iOS you cannot serve pages via http/https locally because those are reserved for external sites, so you need to use a custom protocol (e. g.
my-cool-app://, etc.). This is not possible with
elm/url due to this issue: Support protocols different from http / https · Issue #10 · elm/url · GitHub
So I dug through different strategies to solve this problem and the most compelling idea was this proposal by Evan:
However: while this theoretically works, I now have the problem that I cannot reexport
<?> because I’m not a blessed package author.
Is there a way to reexport it? Or has someone an idea on how to make the parser combination more readable?
parser = Parser.map Params (slash (Parser.s "a") (slash (Parser.s "b") Parser.string))
is definitively less readable than
parser = Parser.map Params (Parser.s "a" </> Parser.s "b" </> Parser.string)
Edit: This solution also has the drawback that you cannot use
elm/browser directly because it depends on