Skip to content

Commit

Permalink
Use abs in QuickCheck example
Browse files Browse the repository at this point in the history
Fixes #50
  • Loading branch information
martijnbastiaan committed Dec 23, 2022
1 parent e2bc14b commit 8a41359
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased
* `getNumProcessors` is now used to detect the (default) number of GHCi subprocesses to spawn. This should more reliably use all of a system's resources. Fixes [#53](https://github.com/martijnbastiaan/doctest-parallel/issues/53).
* Add Nix support. If the environment variable `NIX_BUILD_TOP` is present an extra package database is added to `GHC_PACKAGE_PATH`. This isn't expected to break existing builds, but if it does consider passing `--no-nix`. ([#34](https://github.com/martijnbastiaan/doctest-parallel/issues/34))
* The QuickCheck example mentioned in the README now uses `abs` instead of `sort`. This prevents confusing errors when `sort` is not imported. Fixes [#50](https://github.com/martijnbastiaan/doctest-parallel/issues/50).

# 0.2.5
* Loosen Cabal bounds to >= 2.4 && < 3.9
Expand Down
4 changes: 2 additions & 2 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ verify properties with QuickCheck. A simple property looks like this:

```haskell
-- |
-- prop> \xs -> sort xs == (sort . sort) (xs :: [Int])
-- prop> \n -> abs n == abs (abs (n :: Int))
```

The lambda abstraction is optional and can be omitted:

```haskell
-- |
-- prop> sort xs == (sort . sort) (xs :: [Int])
-- prop> abs n == abs (abs (n :: Int))
```

A complete example that uses setup code is below:
Expand Down

0 comments on commit 8a41359

Please sign in to comment.