diff --git a/config.toml b/config.toml index 13ef83a..0613633 100644 --- a/config.toml +++ b/config.toml @@ -10,6 +10,8 @@ taxonomies = [ ] [extra] +skin = "red" +default_theme = "dark" show_author = true favicon = "favicon.png" menu = [ @@ -18,6 +20,3 @@ menu = [ ] stylesheets = ["highlight.css", "highlight_fix.css"] enable_csp = false - -[markdown] -highlight_code = false diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/complex-instance.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/complex-instance.png new file mode 100644 index 0000000..4dff487 Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/complex-instance.png differ diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/constructor-not-found.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/constructor-not-found.png new file mode 100644 index 0000000..9d585d7 Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/constructor-not-found.png differ diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/duplicate-annotation.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/duplicate-annotation.png new file mode 100644 index 0000000..8d401fa Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/duplicate-annotation.png differ diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/index.md b/content/blog/making-flix-compiler-errors-helpful-and-delightful/index.md new file mode 100644 index 0000000..5311ee2 --- /dev/null +++ b/content/blog/making-flix-compiler-errors-helpful-and-delightful/index.md @@ -0,0 +1,40 @@ ++++ +title = "Making Flix Compiler Errors Helpful and Delightful" +description = "A tour of the new and improved error messages in the Flix compiler, featuring syntax highlighting, clearer explanations, and actionable suggestions." +date = 2026-01-30 +authors = ["Magnus Madsen"] + +[taxonomies] +tags = ["language-design", "flix"] ++++ + +Inspired by Elm's +[Compiler Errors for Humans](https://elm-lang.org/news/compiler-errors-for-humans) and +[Compilers as Assistants](https://elm-lang.org/news/compilers-as-assistants), +we recently took a step back and reworked *every* error message in the Flix compiler. + +Here is what you can look forward to in the next version of Flix: + +All error messages now have **semantic** syntax highlighting. For single-line errors: +![unexpected argument](unexpected-argument.png) + +And for multi-line errors: +![mismatched types](mismatched-types.png) + +Simple errors are kept brief: +![duplicate annotation](duplicate-annotation.png) + +Whereas complex errors come with explanations and examples: +![missing implementation](missing-implementation.png) + +And, when possible, with suggestions for a fix: +![constructor not found](constructor-not-found.png) + +For very complex errors, we now give an in-depth technical explanation: +![complex instance](complex-instance.png) + +--- + +That's all for now. + +Hope you enjoy our new colors! \ No newline at end of file diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/mismatched-types.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/mismatched-types.png new file mode 100644 index 0000000..1cda68c Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/mismatched-types.png differ diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/missing-implementation.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/missing-implementation.png new file mode 100644 index 0000000..a0f6f3d Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/missing-implementation.png differ diff --git a/content/blog/making-flix-compiler-errors-helpful-and-delightful/unexpected-argument.png b/content/blog/making-flix-compiler-errors-helpful-and-delightful/unexpected-argument.png new file mode 100644 index 0000000..c3b431f Binary files /dev/null and b/content/blog/making-flix-compiler-errors-helpful-and-delightful/unexpected-argument.png differ