envy
envy copied to clipboard
(WIP, RFC) Distinguish variable-not-found-error from others
Problem
- Handling
Maybe
values in theParser
monad is troublesome. - Even
envMaybe
mixes up variable-not-found-error with others, which makes the difference ofNothing
andLeft String
obscure.
Solution
Change the error type of Parser a
from just a String
into
a dedicated error ADT ParseError
.
NOTE
- Fix https://github.com/dmjio/envy/issues/30 as a bonus!