When you run into a DeadEnd, I record some information about why you
got stuck. This data is useful for producing helpful error messages. This is
how problemToString works!
Note: If you feel limited by this type (i.e. having to represent custom
problems as strings) I highly recommend switching to the :module module. It
lets you define your own Problem type. It can also track "context" which
can improve error messages a ton! This is how the Elm compiler produces
relatively nice parse errors, and I am excited to see those techniques applied
elsewhere!
When you run into a
DeadEnd
, I record some information about why you got stuck. This data is useful for producing helpful error messages. This is how problemToString works!Note: If you feel limited by this type (i.e. having to represent custom problems as strings) I highly recommend switching to the :module module. It lets you define your own
Problem
type. It can also track "context" which can improve error messages a ton! This is how the Elm compiler produces relatively nice parse errors, and I am excited to see those techniques applied elsewhere!