Skip to content

Whitespace trimming, relative uris, orphan instances #2

Description

@sordina

Hi!

I just made some small tweaks to allow whitespace and relative uris in the quasiquoter.

parse :: String -> Maybe U.URI
parse s = headMay $ mapMaybe ($ s) [ U.parseURI, U.parseRelativeReference ]

and

...
quoteExp  = fmap unType . staticURI . trim
...

Would they be useful? And if so, would it be better to have a second qq for the relative uri feature?

Could there be problems with trimming whitespace?

Also, is there a way to avoid the orphan instances? Newtype wrappers are quite hard to integrate into the QQ.

I asked on the Gittr chat, but nobody was around.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions