@@ -33,11 +33,10 @@ interfaceDecode filePath bytes = do
3333 Right (_, _, binaryInfo) -> Right binaryInfo
3434
3535 Left (_, offset, err) ->
36− Left $ concat [ "Got an error, '" ++ err ++ "' at offset "
37− , show offset ++ " of " ++ filePath ++ ".\n\n"
38− , "This error may be due to an outdated or corrupt "
39− , "artifact from a previous build. Please rebuild "
40− , filePath ++ " and try again."
36+ Left $ concat [ "Error reading build artifact: ", filePath, "\n"
37+ , " The exact error was '", err, "' at offset ", show offset, ".\n"
38+ , " The file was generated by a previous build and may be outdated or corrupt.\n"
39+ , " Please remove the file and try again."
4140 ]
4241
4342validVersion :: FilePath -> (String, ModuleInterface) ->
@@ -46,6 +45,8 @@ validVersion filePath (name, interface) =
4645 if iVersion interface == showVersion version then
4746 Right (name, interface)
4847 else
49− Left $ "Found build artifacts created by a different " ++
50− "Elm compiler version. Please rebuild " ++
51− filePath ++ " and try again."
48+ Left $ concat
49+ [ "Error reading build artifact: ", filePath, "\n"
50+ , " It was generated by a different version of the compiler: ", iVersion interface, "\n"
51+ , " Please remove the file and try again.\n"
52+ ]