Skip to content

Commit

Permalink
improve the flow of the todo documentation a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ekmett committed Sep 11, 2024
1 parent 69ead39 commit 1a1e521
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for placeholder

## 0 -- 2024-03-25
## [next]

* Minor documentation flow improvements

## 0 -- 2024-09-11

* First version. Released on an unsuspecting world.
13 changes: 9 additions & 4 deletions src/Control/Placeholder.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,16 @@ withCallStack f stk = unsafeDupablePerformIO do
It is to be used whenever you want to indicate that you are missing a part of
the implementation and want to fill that in later.
The main difference to other alternatives like typed holes and 'undefined'
or 'error' is, this does not throw an error but only emits a warning.
The main difference to other alternatives like 'undefined'
or 'error' is this also emits a warning at compile time.
Similarly to 'undefined', 'error' and typed holes, this will throw an error if
it is evaluated at runtime which can only be caught in 'IO'.
Similarly to 'undefined' and 'error', this will throw an error if
it is evaluated at runtime which can only be caught in 'IO'. Unlike typed holes,
at least without @-fdefer-typed-holes@ enabled, compilation is allowed to proceed
and the program can be run.
Variants such as 'TODO' and 'todoIO' allow usage in patterns and offer more control
over when the exception is thrown when this code is encountered at runtime.
This is intended to *never* stay in code but exists purely for signifying
"work in progress" code.
Expand Down

0 comments on commit 1a1e521

Please sign in to comment.