morphir-elm
morphir-elm copied to clipboard
Error messages from make -f are more concise and readable than from make
Describe the bug Type errors coming from the incremental compiler are much more verbose and unclear than those coming from the non-incremental compiler.
To Reproduce Steps to reproduce the behavior:
Starting from following code snippet with a type error:
module Scratch.ExampleModule exposing (..)
typeErrorTest : Bool -> String
typeErrorTest x = True
Compiled with morphir-elm make -f
, this produces a fairly nice error:
Error: [
[
"errors_in_source_file",
"ExampleModule",
[
{
"errorMessage": "Type error in value 'typeErrorTest': Could not unify 'Morphir.SDK:String:string' with 'Morphir.SDK:Basics:bool' because the references do not match",
"sourceLocations": []
}
]
]
]
Whereas comping with morphir-elm make
, you get:
Error: [
[
"RepoError",
"Cannot process value",
[
[
"TypeCheckError",
[
[
"example",
"module"
]
],
[
"type",
"error",
"test"
],
[
"UnifyError",
[
"CouldNotUnify",
"RefMismatch",
[
"meta_ref",
[
[
[
"morphir"
],
[
"s",
"d",
"k"
]
],
[
[
"string"
]
],
[
"string"
]
],
[],
null
],
[
"meta_ref",
[
[
[
"morphir"
],
[
"s",
"d",
"k"
]
],
[
[
"basics"
]
],
[
"bool"
]
],
[],
null
]
]
]
]
]
]
]
Expected behavior A more concise (/readable, /pretty-printed) error should be given in both instances.
Desktop (please complete the following information):
- OS: [e.g. iOS] OSX
- Browser: Unused
- Version 2.89.0