Skip to content

Commit

Permalink
Hedgehog.Internal.State: Add instance Applicative Concrete
Browse files Browse the repository at this point in the history
  • Loading branch information
endgame committed Jun 16, 2023
1 parent 2fd068c commit 1ea0603
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Version 1.2.1 (unreleased)

* Add `instance Applicative Concrete` ([#493][493], [@endgame][endgame])
* Export `Hedgehog.Internal.Seed.seed` ([#477][477], [@sol][sol])

## Version 1.2 (2022-08-28)
Expand Down Expand Up @@ -271,6 +272,8 @@
https://github.com/jhrcek


[493]:
https://github.com/hedgehogqa/haskell-hedgehog/pull/493
[462]:
https://github.com/hedgehogqa/haskell-hedgehog/pull/462
[461]:
Expand Down
5 changes: 5 additions & 0 deletions hedgehog/src/Hedgehog/Internal/State.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ newtype Concrete a where
Concrete :: a -> Concrete a
deriving (Eq, Ord, Functor, Foldable, Traversable)

-- | @since 1.2.1
instance Applicative Concrete where
pure = Concrete
Concrete f <*> Concrete x = Concrete $ f x

instance Show a => Show (Concrete a) where
showsPrec =
showsPrec1
Expand Down

0 comments on commit 1ea0603

Please sign in to comment.