Skip to content
Snippets Groups Projects
Commit eca9e861 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Add `NFData` instance for new `Natural` type (#2)

parent 75ce5767
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,9 @@ import Data.Complex ...@@ -64,6 +64,9 @@ import Data.Complex
import Data.Array import Data.Array
import Data.Fixed import Data.Fixed
import Data.Version import Data.Version
#if MIN_VERSION_base(4,8,0)
import Numeric.Natural ( Natural )
#endif
#if __GLASGOW_HASKELL__ >= 702 #if __GLASGOW_HASKELL__ >= 702
import GHC.Generics import GHC.Generics
...@@ -208,6 +211,11 @@ instance NFData Word16 where rnf !_ = () ...@@ -208,6 +211,11 @@ instance NFData Word16 where rnf !_ = ()
instance NFData Word32 where rnf !_ = () instance NFData Word32 where rnf !_ = ()
instance NFData Word64 where rnf !_ = () instance NFData Word64 where rnf !_ = ()
#if MIN_VERSION_base(4,8,0)
-- |/Since: 1.4.0.0/
instance NFData Natural where rnf !_ = ()
#endif
-- |/Since: 1.3.0.0/ -- |/Since: 1.3.0.0/
instance NFData (Fixed a) where rnf !_ = () instance NFData (Fixed a) where rnf !_ = ()
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
instance NFData XYZ where rnf x = seq x () instance NFData XYZ where rnf x = seq x ()
* New `NFData` instances for `base` types:
- `Numeric.Natural.Natural`
## 1.3.0.2 *Nov 2013* ## 1.3.0.2 *Nov 2013*
* Bundled with GHC 7.8.1 * Bundled with GHC 7.8.1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment