-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider supporting elm/url #1140
Comments
@stephengoldbaum and @AttilaMihaly I actually think exposing a Url type is useful for Morphir, use of a Url for location and indexing concepts have come up in various business scenarios as Url is about addressing not just web work. I'd be happy to submit a PR to add this. |
This is like UUID in terms of structured string types. Should we add each
of these as unique types or add support for Typed Strings like Bosque has?
…On Thu, Feb 8, 2024 at 11:40 PM Damian Reeves ***@***.***> wrote:
@stephengoldbaum <https://github.com/stephengoldbaum> and @AttilaMihaly
<https://github.com/AttilaMihaly> I actually think exposing a Url type is
useful for Morphir, use of a Url for location and indexing concepts have
come up in various business scenarios as Url is about addressing not just
web work.
I'd be happy to submit a PR to add this.
—
Reply to this email directly, view it on GitHub
<#1140 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7SPJF7B4CBNZCB4NAUA3YSVH6TAVCNFSM6AAAAABDARHRTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVGA2DOMBUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Can we represent a URL as a custom type in user code? Something like this: type alias URL =
{ scheme : Scheme
, authority : Authority
, path : Path
, query : Query
, fragment : Fragment
} I didn't get into the details of each part because I just wanted to demonstrate the idea. I think we should start thinking in terms of an extension mechanism that allows people to add new libraries to extend the SDK because otherwise we will have maintenance issues. |
We did try this but there are limits to what we support at the API layer. I think we should consider what are the base types we support so we can move to the model you are suggesting @AttilaMihaly . But I don't think we are there yet, for both UUID and URL we are missing vital parts crucial to constructing these things. |
Is your feature request related to a problem? Please describe.
I'd love to be able to leverage the
elm/url
package - in particular, the ability to do url encoding and decodingDescribe the solution you'd like
Being able to import/use
elm/url
or the equivalent from MorphirI've considered implementing the function I need (
percentEncode
) in pure elm using the EcmaScript spec for the equivalent (which is what the Elm Kernel seems to use under the covers anyway)The text was updated successfully, but these errors were encountered: