Skip to content

Commit

Permalink
Better formatting for errors messages instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Wales authored and Philip Wales committed Jan 7, 2020
1 parent 27f022e commit c92bb35
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Ccap/Codegen/Imports.purs
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ data ImportError
instance importValidationError :: ValidationError ImportError where
printError = case _ of
NotFound mod imprt ->
mod.name <> " tried to import module: " <> imprt
mod.name
<> " tried to import module: "
<> imprt
<> " but it does not exist, or was not included."
ParseError imprt message -> "Parsing imported module, " <> imprt <> ", failed with error: " <> message
ParseError imprt message ->
"Parsing imported module, "
<> imprt
<> ", failed with error: "
<> message

importPath :: Import -> FilePath
importPath = String.replaceAll (Pattern ".") (Replacement Path.sep)
Expand Down

0 comments on commit c92bb35

Please sign in to comment.