This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0 2.0.1
Fork of: A (woefully-incomplete) parser for RFC5988 Links
version 2.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 2.0.0
Committed At 2018-08-02 07:15:37 UTC
elm-tools/parser 2.0.1 <= v < 3.0.0 2.0.1
elm-lang/html 2.0.0 <= v < 3.0.0 2.0.0
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

Fork of Elm RFC5988 Parser

A (presently woefully incomplete) parser for the upcoming RFC5988 replacement draft, written in Elm using elm-combine for DailyDrip.

Example

There are some examples in the test suite, but here's one:

Expect.equal
  (parse rfc5988 "<http://urbit.org>; rel=\"start\"")
  ( Ok { context = "", target = "http://urbit.org", relationType = "start", targetAttributes = Dict.empty }
  , { input = "", position = 31 }
  )

Todo

There's a lot of stuff left to do here. Here's an almost-certainly-incomplete list:

  • [ ] Handle context at all (I think we want to just partially-apply one when parsing in the first place?)
  • [ ] Determine whether it makes any sense at all for relationType to have its own field.
  • [ ] Determine if we should add other similar fields, if that was reasonable.
  • [ ] There are almost certainly some fields that should have a Maybe type signature.
  • [ ] If there are two rel parameters, there's a very specific callout in the spec that we're supposed to follow that we almost certainly aren't (but they aren't supposed to have them either!)