-
Notifications
You must be signed in to change notification settings - Fork 11
Description
At some point we want to have our Haskell snippets automatically compiled and checked as part of the CI checks to reduce the likelihood of releasing erroneous code examples.
There are a number of ways to make documents that serve as both document markup and compilable Haskell source.
What would be particularly handy is being able to directly compile markdown embedded snippets, since we're already using markdown.
As well as checking that Haskell file style snippets compile, It would be beneficial to be able to check that our GHCi session snippets are also correct.
There are no guarantees that a GHCi snippet that is correct at the time of writing will be correct forever.
Here are some of the ways a dependency update could break our GHCi snippets:
- A term could be changed or removed, leading to a GHCi error.
- A term could be added, leading to an ambiguity error or non-exhaustive pattern match error.
- A term's meaning could change, leading to a different output and making the documentation out-of-date.
- A new major compiler version could alter syntax, type checking or language extension behavior, leading to a GHCi error.
- A compiler update may change error messages or make formerly erroneous code compile, out-dating error example snippets.
It would be ideal to be able to detect all of these situations in the CI checks.