I want to create a Decoder which only matches a specific string value, and 
fails with all others:

onlyMatchesHello :: Json.Decode.Decoder ()
onlyMatchesHello = -- what goes here?

Json.Decode.decodeString onlyMatchesHello "\"hello\"" == Ok ()
Json.Decode.decodeString onlyMatchesHello "\"something else\"" == Err ...

Any idea how to do this?

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to