Add spaces to make a more readable error message
Motivation
I stared at this error message for a little while today, unable to parse out what was wrong.
persistent > /home/matt/Projects/persistent/persistent/Database/Persist/ImplicitIdDef.hs:1:8: error:
persistent > File name does not match module name:
persistent > Saw: ‘Databse.Persist.ImplicitIdDef’
persistent > Expected: ‘Database.Persist.ImplicitIdDef’
persistent > |
persistent > 1 | module Databse.Persist.ImplicitIdDef
persistent > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
persistent >
I typoed Databse
, and it took me an embarrassingly long time to find that out.
Proposal
Add some spaces after Saw:
so it lines up with Expected:
.
persistent > /home/matt/Projects/persistent/persistent/Database/Persist/ImplicitIdDef.hs:1:8: error:
persistent > File name does not match module name:
persistent > Saw: ‘Databse.Persist.ImplicitIdDef’
persistent > Expected: ‘Database.Persist.ImplicitIdDef’
persistent > |
persistent > 1 | module Databse.Persist.ImplicitIdDef
persistent > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
persistent >
This makes it much more obvious where the problem is.