hedgehog-extras 0.10.0.0 → 0.10.1.0
raw patch · 9 files changed
+499/−64 lines, 9 filesdep −generic-lensdep −hw-preludedep −microlensdep ~Diffdep ~Win32dep ~aesonPVP ok
version bump matches the API change (PVP)
Dependencies removed: generic-lens, hw-prelude, microlens
Dependency ranges changed: Diff, Win32, aeson, aeson-pretty, async, base, bytestring, containers, deepseq, directory, exceptions, filepath, hedgehog, http-conduit, lifted-async, lifted-base, mmorph, monad-control, mtl, network, process, resourcet, stm, tar, tasty, tasty-discover, tasty-hedgehog, temporary, text, time, transformers, transformers-base, unliftio, yaml, zlib
API changes (from Hackage documentation)
Files
- CHANGELOG.md +369/−0
- LICENSE +1/−1
- NOTICE +1/−1
- README.md +73/−0
- hedgehog-extras.cabal +41/−46
- src/Hedgehog/Extras/Internal/Win32/NamedPipes.hsc +0/−1
- src/Hedgehog/Extras/Test/Base.hs +9/−9
- src/Hedgehog/Extras/Test/Network.hs +1/−1
- src/Hedgehog/Extras/Test/Unit.hs +4/−5
+ CHANGELOG.md view
@@ -0,0 +1,369 @@+# Changelog++All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),+and this project adheres to the [Package Versioning Policy (PVP)](https://pvp.haskell.org/).++## *Unreleased*++## [0.10.1.0] - 2025-11-03++### Changed+- Updated dependency on tar ^>= 0.7++## [0.10.0.0] - 2025-09-09++### Added+- Comprehensive CHANGELOG.md with complete project history+- Descriptive error messages for workspace test failures+- Sum type `WorkspacePolicy` to replace boolean blindness in `workspaceWithConfig`++### Changed+- `workspaceWithConfig` now uses `WorkspacePolicy` instead of `Bool` parameter+- Improved error messages in workspace tests with specific failure contexts+- Updated documentation to reference Package Versioning Policy (PVP) instead of SemVer++## [0.9.0.0] - 2025-06-24++### Changed+- Fix hanging problem with moduleWorkspace++### Added+- Workspace behavior tests and improved workspace API+- Directory dependency to test suite+- GHC 9.8 to GHA build matrix+- Claude IDE command templates for git operations++### Fixed +- Preserve workspace directories on test failure for debugging++## [0.8.0.0] - 2025-06-14++### Added+- New `testUnitIO` function++### Changed+- Make binDist search components recursively++### Removed+- Delete unused 'h' file++## [0.7.2.0] - 2025-06-07++### Added+- MonadAssertion instance to UnitIO++## [0.7.1.0] - 2025-06-06++### Added+- New assertion functions: `tryAssertion`, `assertFailure` and `assertFailure_`+- Re-export MonadBaseControl, bracket_ and bracket++## [0.7.0.0] - 2024-12-24++### Added+- Add `expectFailure` combinator+- Add `expectFailureWith` combinator and tests+- New UnitIO monad+- Thread safe golden test support+- Add diffVsGoldenFileExcludeTrace function+- Re-export Golden module from Test module+- Move orphans to own file++### Changed+- Generalize resulting monad in `expectFailure`+- Define `expectFailure` in terms of `expectFailureWith`+- Haskell CI: reduce number of shellcheck warnings+- Haskell CI: simplify build workflow, using cardano-cli's CI as guidance+- Loosen base version, to allow building with GHC 9.12+- Align haddock pipeline with Haskell pipeline+- Make the GitHub page workflow manually triggerable (workflow_dispatch)++### Fixed+- Fix haddock for `threadDelay`+- Fix haddock for `byDeadline` and `byDuration`+- Process: more informative error message when plan.json does not exist+- Detail: fix a warning in the Haskell pipeline++## [0.6.5.1] - 2024-11-20++### Changed+- Enforce UTF-8 encoding on reading and writing files++## [0.6.5.0] - 2024-07-27++### Added+- Make it build with ghc-9.10+- CI: Add ghc-9.10 to the build matrix++## [0.6.4.0] - 2024-05-16++### Added+- Add missing `HasCallStack` to writeGoldenFile, reportGoldenFileMissing, checkAgainstGoldenFile++### Changed+- Use removePathForcibly to remove directories++## [0.6.3.0] - 2024-05-03++### Added+- Add TestWatchdog and Tripwire with their tests+- Add test for asyncRegister_++### Changed+- Switch to using haskell-actions/setup+- Allow the port to be reused immediately after it is closed++## [0.6.2.0] - 2024-04-23++### Added+- New randomPort, reserveRandomPort and portInUse functions++### Changed+- Apply suggestions from code review+- Remove double space and add quotes++## [0.6.1.0] - 2024-02-13++### Added+- Add test to ensure a directory doesn't exist (`assertDirectoryMissing`)+- Add test to ensure a directory exists (`assertDirectoryExists`)++### Changed+- Allow reading files into any FromJSON+- Lower aeson bound+- #39 Lower bound on aeson+- Remove double printing of a command with its arguments++## [0.6.0.2] - 2024-01-29++### Fixed+- Fix missing call sites for short-circuiting functions++## [0.6.0.1] - 2024-01-23++### Fixed+- Fix missing stderr in failed commands++## [0.6.0.0] - 2024-01-16++### Added+- Add exec variant that allows a negative call (#55)+- Add concurrency abstractions from lifted-async and lifted-base++## [0.5.1.0] - 2024-01-04++### Added+- New RECREATE_GOLDEN_FILES which will causes golden tests to always create golden files replacing any existing golden files++### Changed+- Use MultiwayIf to simplify code++## [0.5.0.0] - 2023-11-23++### Added+- Add upper bound to tar++### Changed+- Make it build with ghc-9.8+- CI: Add ghc-9.8.1 to build matrix++### Removed+- Remove unused import++## [0.4.8.0] - 2023-11-21++### Changed+- Make it build with ghc-9.8+- CI: Add ghc-9.8.1 to build matrix++### Removed+- Remove unused import++## [0.4.7.1] - 2023-10-05++### Removed+- Remove dependency on hw-aeson++## [0.4.7.0] - 2023-06-27++### Added+- New indexM function++## [0.4.6.0] - 2023-06-19++### Added+- Add a way to log golden files+- Create new process groups for newly spawned processes (#42)++## [0.4.5.1] - 2023-05-10++### Fixed+- Fix empty case for diffVsGoldenFile++### Changed+- Put the golden-file filename in the failure message of diffVsGoldenFile++## [0.4.5.0] - 2023-05-09++### Added+- New downloadToFile function+- New downloadAndExtractGithubCommitToTemp++### Fixed+- Fix annotation for renameFile++## [0.4.4.1] - 2023-05-05++### Added+- Make it build with ghc-9.6+- CI: Add ghc-9.6.1 to build matrix++## [0.4.4.0] - 2023-05-04++### Added+- Add extra assertion functions, fix readM to show correct line (#33)++### Changed+- Tidy up imports++## [0.4.3.0] - 2023-05-03++### Added+- Add assertWithinTolerance and readM++## [0.4.2.0] - 2023-04-28++### Added+- New functions assertFileExists assertFileMissing assertFilesMissing+- New Hedgehog.Extras.Test.Golden module++### Removed+- Delete assertFileExists from Network module because it doesn't belong here++### Changed+- Use filepath operator (</>) over (<>) with "/"++## [0.4.1.0] - 2023-04-12++### Added+- New Ok versions of functions that require the operation to succeed+- New createSubdirectoryIfMissing function++### Changed+- Modify createDirectoryIfMissing to return its argument. createDirectoryIfMissing_ will be the version that returns ()++### Fixed+- Fix compile errors++## [0.4.0.1] - 2023-03-06++### Fixed+- Fix retry function++## [0.4.0.0] - 2023-03-06++### Changed+- Pass retry count to retry function++## [0.3.0.3] - 2023-01-09++### Fixed+- Fix moduleWorkspace++## [0.3.0.2] - 2023-01-07++### Added+- Generic instance++## [0.3.0.1] - 2023-01-07++### Changed+- Don't create an intermediate workspace directory+- Find the nearest plan.json+- Restructure cabal file+- Update copyright+- Copy over waitNamedPipe from Win32-network++### Removed+- Remove unused dependency on Win32-network++### Fixed+- Use setup-haskell action++## [0.3.0.0] - 2022-12-13++### Added+- Add errorMessage to argument of deadline functions+- getProjectBase: explore up the dir hierarchy to find cabal.project+- New fromJustM function+- Add .gitignore file++### Changed+- Update GH actions versions+- Relax bounds on aeson++## Early Versions (0.1.0.0 - 0.2.x)++### 2022+- New rewriteArrayElements function+- Update to support aeson >= 2.0.0 (#8)+- Replace waitByDeadlineX functions to byDeadlineX functions that trigger retries by assertion failure (#7)+- Add retry support (#6)++### 2021+- Module re-exports (#5)+- Generic error handling functions (#4)+- New exec, binFlex functions. New execConfigCwd field (#3)+- Add support for YAML (#2)+- Force evaluation of string for cat (#1)+- Setup Github Actions CI+- Downgrade cabal file version to 2.4 because 3.0 is incompatible with stack+- Drop support for ghc-8.6.5+- Harmonise component versions and remove redundant conditionals+- Import cardano-submit-api from cardano-rest repo+- Test support for running CLI commands with environment variables+- Run golden tests at the value level rather than the text level+- Update copyright to 2021+- Cabal 3.4 in Github Actions++### 2020+- New copyRewriteJsonFile function to work around permissioning issues on Hydra+- Remove redundant imports+- General chairman test code quality changes+- Chairman test running on Windows and Linux+- Report all log files on any test failure+- Bump versions to 1.21.0 and update the change logs+- Run byron-shelley testnet+- Run a chairman process per node+- Increase test code re-use by moving test support code into separate common hedgehog-extras library++[Unreleased]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.10.0.0...HEAD+[0.10.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.9.0.0...v0.10.0.0+[0.9.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.8.0.0...v0.9.0.0+[0.8.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.7.2.0...v0.8.0.0+[0.7.2.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.7.1.0...v0.7.2.0+[0.7.1.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.7.0.0...v0.7.1.0+[0.7.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.5.1...v0.7.0.0+[0.6.5.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.5.0...v0.6.5.1+[0.6.5.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.4.0...v0.6.5.0+[0.6.4.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.3.0...v0.6.4.0+[0.6.3.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.2.0...v0.6.3.0+[0.6.2.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.1.0...v0.6.2.0+[0.6.1.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.0.2...v0.6.1.0+[0.6.0.2]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.0.1...v0.6.0.2+[0.6.0.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.6.0.0...v0.6.0.1+[0.6.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.5.1.0...v0.6.0.0+[0.5.1.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.5.0.0...v0.5.1.0+[0.5.0.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.8.0...v0.5.0.0+[0.4.8.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.7.1...v0.4.8.0+[0.4.7.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.7.0...v0.4.7.1+[0.4.7.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.6.0...v0.4.7.0+[0.4.6.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.5.1...v0.4.6.0+[0.4.5.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.5.0...v0.4.5.1+[0.4.5.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.4.1...v0.4.5.0+[0.4.4.1]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.4.0...v0.4.4.1+[0.4.4.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.3.0...v0.4.4.0+[0.4.3.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.4.2.0...v0.4.3.0+[0.4.2.0]: https://github.com/input-output-hk/hedgehog-extras/compare/v0.3.0.2...v0.4.2.0
LICENSE view
@@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2021 Input Output (Hong Kong) Ltd.+ Copyright 2025 Input Output (Hong Kong) Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
NOTICE view
@@ -1,4 +1,4 @@-Copyright 2021-2023 Input Output (Hong Kong) Ltd.+Copyright 2021-2025 Input Output (Hong Kong) Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
+ README.md view
@@ -0,0 +1,73 @@+# hedgehog-extras+++[](https://github.com/input-output-hk/hedgehog-extras/actions/workflows/haskell.yml)++Supplemental library for hedgehog.++## About++This library provides additional utilities and helpers for working with the [Hedgehog](https://hackage.haskell.org/package/hedgehog) property-based testing framework.++## Installation++Add to your `package.yaml` or `.cabal` file:++```yaml+dependencies:+ - hedgehog-extras+```++## Releasing++This project has a hybrid automated/manual release flow:++### Automatic Tagging (on main branch)++When you push a version bump to main, CI automatically creates a git tag:++1. Update [CHANGELOG.md] to include the *Unreleased* changes in the changelog for the new version.+1. Update `hedgehog-extras.cabal` and set `version:` to the new version+1. Commit and push to main: `git commit -m "Bump version to X.Y.Z.W" && git push origin main`+1. CI automatically creates and pushes tag `vX.Y.Z.W`+1. The release workflow then runs automatically++### Manual Tagging++Alternatively, you can manually create and push tags:++1. Update `hedgehog-extras.cabal` with the new version+2. Commit changes: `git commit -m "Release X.Y.Z.W"`+3. Create tag: `git tag -a vX.Y.Z.W -m "Release version X.Y.Z.W"`+4. Push both: `git push origin main && git push origin vX.Y.Z.W`++### What Happens Automatically++When a tag is pushed (either automatically or manually), GitHub Actions:+- Runs the full test suite across all platforms and GHC versions+- Validates the cabal project with `cabal check`+- Creates source distributions (`cabal v2-sdist`)+- **Uploads to Hackage as a candidate** (requires `HACKAGE_USER` and `HACKAGE_PASS` secrets)+- Generates release notes from git commit history+- Creates a GitHub Release++### Publishing the Hackage Candidate++After the workflow completes:+1. Check the candidate at https://hackage.haskell.org/package/hedgehog-extras/candidates+2. Test the candidate package+3. When ready, publish it from the Hackage candidate page++### Notes++- The workflow is defined in `.github/workflows/haskell.yml`+- Packages are uploaded as **candidates**, not published releases+- Release notes are auto-generated from git commits since the last tag+- The workflow requires `HACKAGE_USER` and `HACKAGE_PASS` repository secrets+- Workflow requires `contents: write` permission (already configured)++## License++Copyright 2025 Input Output Global, Inc.++Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.
hedgehog-extras.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: hedgehog-extras-version: 0.10.0.0+version: 0.10.1.0 synopsis: Supplemental library for hedgehog description: Supplemental library for hedgehog. category: Test@@ -11,57 +11,55 @@ license-files: LICENSE NOTICE build-type: Simple-+extra-doc-files: CHANGELOG.md+ README.md source-repository head type: git location: https://github.com/input-output-hk/hedgehog-extras -common aeson { build-depends: aeson >= 2.0.0.0 }-common aeson-pretty { build-depends: aeson-pretty >= 0.8.5 }-common async { build-depends: async }-common base { build-depends: base >= 4.12 && < 4.22 }-common bytestring { build-depends: bytestring }-common containers { build-depends: containers }-common deepseq { build-depends: deepseq }-common Diff { build-depends: Diff }-common directory { build-depends: directory }-common exceptions { build-depends: exceptions }-common filepath { build-depends: filepath }-common generic-lens { build-depends: generic-lens }-common hedgehog { build-depends: hedgehog }-common hedgehog-quickcheck { build-depends: hedgehog-quickcheck }-common http-conduit { build-depends: http-conduit }-common hw-prelude { build-depends: hw-prelude }-common lifted-async { build-depends: lifted-async }-common lifted-base { build-depends: lifted-base }-common microlens { build-depends: microlens }-common mmorph { build-depends: mmorph }-common monad-control { build-depends: monad-control }-common mtl { build-depends: mtl }-common network { build-depends: network }-common process { build-depends: process }-common resourcet { build-depends: resourcet }-common retry { build-depends: retry >= 0.9 }-common stm { build-depends: stm }-common tar { build-depends: tar ^>= 0.6 }-common tasty { build-depends: tasty }-common tasty-discover { build-depends: tasty-discover >= 5.0.2 }-common tasty-hedgehog { build-depends: tasty-hedgehog }-common tasty-quickcheck { build-depends: tasty-quickcheck }-common temporary { build-depends: temporary }-common text { build-depends: text }-common time { build-depends: time >= 1.9.1 }-common transformers { build-depends: transformers }-common transformers-base { build-depends: transformers-base }-common unliftio { build-depends: unliftio }-common yaml { build-depends: yaml }-common zlib { build-depends: zlib }+common aeson { build-depends: aeson >= 2.0.0.0 && < 2.3 }+common aeson-pretty { build-depends: aeson-pretty >= 0.8.5 && < 0.9 }+common async { build-depends: async < 2.3 }+common base { build-depends: base >= 4.12 && < 4.22 }+common bytestring { build-depends: bytestring < 0.13 }+common containers { build-depends: containers < 0.9 }+common deepseq { build-depends: deepseq < 1.6 }+common Diff { build-depends: Diff < 1.1 }+common directory { build-depends: directory < 1.4 }+common exceptions { build-depends: exceptions < 0.11 }+common filepath { build-depends: filepath < 1.6 }+common hedgehog { build-depends: hedgehog < 1.8 }+common hedgehog-quickcheck { build-depends: hedgehog-quickcheck < 0.2 }+common http-conduit { build-depends: http-conduit < 2.4 }+common lifted-async { build-depends: lifted-async < 0.12 }+common lifted-base { build-depends: lifted-base < 0.3 }+common mmorph { build-depends: mmorph < 1.3 }+common monad-control { build-depends: monad-control < 1.1 }+common mtl { build-depends: mtl < 2.4 }+common network { build-depends: network < 3.3 }+common process { build-depends: process < 1.7 }+common resourcet { build-depends: resourcet < 1.4 }+common retry { build-depends: retry >= 0.9 && < 0.10 }+common stm { build-depends: stm < 2.6 }+common tar { build-depends: tar >= 0.7 && < 0.8 }+common tasty { build-depends: tasty < 1.6 }+common tasty-discover { build-depends: tasty-discover >= 5.0.2 && < 5.3 }+common tasty-hedgehog { build-depends: tasty-hedgehog < 1.5 }+common tasty-quickcheck { build-depends: tasty-quickcheck < 0.11 }+common temporary { build-depends: temporary < 1.4 }+common text { build-depends: text < 2.2 }+common time { build-depends: time >= 1.9.1 && < 1.16 }+common transformers { build-depends: transformers < 0.7 }+common transformers-base { build-depends: transformers-base < 0.5 }+common unliftio { build-depends: unliftio < 0.3 }+common yaml { build-depends: yaml < 0.12 }+common zlib { build-depends: zlib < 0.8 } common hedgehog-extras { build-depends: hedgehog-extras } common Win32 if os(windows)- build-depends: Win32 >= 2.5.4.1+ build-depends: Win32 >= 2.5.4.1 && < 2.15 common project-config default-language: Haskell2010@@ -86,13 +84,10 @@ directory, exceptions, filepath,- generic-lens, hedgehog, http-conduit,- hw-prelude, lifted-async, lifted-base,- microlens, mmorph, monad-control, mtl,
src/Hedgehog/Extras/Internal/Win32/NamedPipes.hsc view
@@ -23,7 +23,6 @@ import Data.String (String) import Foreign.C.String (withCString) import System.IO (IO)-import System.Win32.File import System.Win32.Types hiding (try) -- | Timeout in milliseconds.
src/Hedgehog/Extras/Test/Base.hs view
@@ -176,7 +176,7 @@ expectFailureWith checkFailure prop = GHC.withFrozenCallStack $ do (res, _) <- H.evalIO $ H.runTestT prop case res of- Left failure -> checkFailure failure+ Left e -> checkFailure e _ -> H.failWith Nothing "Expected the test to fail but it passed" -- Property pased but we expected a failure -- | Create a workspace directory which will exist for at least the duration of@@ -614,8 +614,8 @@ -- Expiration of the deadline results in an assertion failure assertByDeadlineIO :: (MonadTest m, MonadIO m, HasCallStack) => UTCTime -> IO Bool -> m () assertByDeadlineIO deadline f = GHC.withFrozenCallStack $ do- success <- liftIO f- unless success $ do+ succeeded <- liftIO f+ unless succeeded $ do currentTime <- liftIO DTC.getCurrentTime if currentTime < deadline then do@@ -630,8 +630,8 @@ -- Expiration of the deadline results in an assertion failure assertByDeadlineM :: (MonadTest m, MonadIO m, HasCallStack) => UTCTime -> m Bool -> m () assertByDeadlineM deadline f = GHC.withFrozenCallStack $ do- success <- f- unless success $ do+ succeeded <- f+ unless succeeded $ do currentTime <- liftIO DTC.getCurrentTime if currentTime < deadline then do@@ -649,8 +649,8 @@ -- Expiration of the deadline results in an assertion failure assertByDeadlineIOFinally :: (MonadTest m, MonadIO m, HasCallStack) => UTCTime -> IO Bool -> m () -> m () assertByDeadlineIOFinally deadline f g = GHC.withFrozenCallStack $ do- success <- liftIO f- unless success $ do+ succeeded <- liftIO f+ unless succeeded $ do currentTime <- liftIO DTC.getCurrentTime if currentTime < deadline then do@@ -669,8 +669,8 @@ -- Expiration of the deadline results in an assertion failure assertByDeadlineMFinally :: (MonadTest m, MonadIO m, HasCallStack) => UTCTime -> m Bool -> m () -> m () assertByDeadlineMFinally deadline f g = GHC.withFrozenCallStack $ do- success <- f- unless success $ do+ succeeded <- f+ unless succeeded $ do currentTime <- liftIO DTC.getCurrentTime if currentTime < deadline then do
src/Hedgehog/Extras/Test/Network.hs view
@@ -86,7 +86,7 @@ H.note_ $ "Downloading " <> url <> " to " <> path H.evalIO $ HTTP.simpleHttp url >>= LBS.writeFile path -tarErrors :: TAR.GenEntries tarPath linkTarget e -> [e]+tarErrors :: TAR.GenEntries content tarPath linkTarget e -> [e] tarErrors entries = TAR.foldEntries (flip const) id (:) entries [] -- | Download a github commit to a temporary directory, extract it and return the path to the extracted directory.
src/Hedgehog/Extras/Test/Unit.hs view
@@ -5,7 +5,6 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE MultiParamTypeClasses #-}-{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -16,19 +15,19 @@ import Control.Monad.Base import Control.Monad.Catch (MonadCatch)+import Control.Monad.IO.Class (MonadIO) import Control.Monad.Morph import Control.Monad.Trans.Control (MonadBaseControl(..)) import Control.Monad.Trans.Resource-import Data.Generics.Product.Any import Data.Maybe import Data.Monoid-import HaskellWorks.Prelude import Hedgehog import Hedgehog.Extras.Internal.Orphans () import Hedgehog.Extras.Test.MonadAssertion (MonadAssertion) import Hedgehog.Internal.Property qualified as H-import Lens.Micro+import Prelude import Test.Tasty.Discover+import Test.Tasty.Discover.TastyInfo qualified as TastyInfo import Test.Tasty.Hedgehog (testProperty) import qualified Test.Tasty as T@@ -49,7 +48,7 @@ instance Tasty (UnitIO ()) where tasty info = pure . testUnitIO testName- where testName = fromMaybe "" $ getLast (info ^. the @"name")+ where testName = fromMaybe "" . getLast $ TastyInfo.name info testUnitIO :: T.TestName -> UnitIO () -> T.TestTree testUnitIO testName =