Skip to content

Commit 882f52f

Browse files
authored
Merge pull request #109 from L0neGamer/deprecate-function-instance
Deprecate function instance
2 parents d6aa88c + e1c30e5 commit 882f52f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

Control/DeepSeq.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,12 @@ instance NFData1 Fixed where liftRnf _ = rwhnf
531531
-- This assumes that WHNF is equivalent to NF for functions.
532532
--
533533
-- @since 1.3.0.0
534+
-- @deprecated 1.5.2.0
535+
#if __GLASGOW_HASKELL__ >= 910
536+
instance {-# DEPRECATED "NFData is not well-defined on function types. https://github.com/haskell/deepseq/issues/16" #-} NFData (a -> b) where rnf = rwhnf
537+
#else
534538
instance NFData (a -> b) where rnf = rwhnf
539+
#endif
535540

536541
-- Rational and complex numbers.
537542

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Upcoming
44

5+
## 1.5.2.0
56

7+
* Deprecate function instance of NFData
8+
([#16](https://github.com/haskell/deepseq/issues/16), [#109](https://github.com/haskell/deepseq/issues/109))
69

710
## 1.5.1.0
811

deepseq.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 1.12
22
name: deepseq
3-
version: 1.5.1.0
3+
version: 1.5.2.0
44
-- NOTE: Don't forget to update ./changelog.md
55

66
license: BSD3

0 commit comments

Comments
 (0)