envy icon indicating copy to clipboard operation
envy copied to clipboard

(WIP, RFC) Distinguish variable-not-found-error from others

Open igrep opened this issue 4 years ago • 0 comments

Problem

  • Handling Maybe values in the Parser monad is troublesome.
  • Even envMaybe mixes up variable-not-found-error with others, which makes the difference of Nothing and Left 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!

igrep avatar Jan 24 '20 10:01 igrep