#3537: Add missing NFData instances to parallel
-----------------------------+----------------------------------------------
Reporter: Roel van Dijk | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries (other)
Version: 6.10.4 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
[http://hackage.haskell.org/packages/archive/parallel/1.1.0.1/doc/html
/Control-Parallel-Strategies.html Control.Parallel.Strategies] contains
many NFData instances for types defined in base, but not all. I propose
adding NFData instances for all types in base where it makes sense.
Attached is a patch which adds instances for most missing types. For many
of those types it would be nicer to define the instances in the module
where the type is defined, but that would require a circular dependency.
Instances in patch:
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/Data-Fixed.html Data.Fixed] (E6, E12, Fixed)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/Data-IORef.html Data.IORef] (IORef)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/Data-STRef.html Data.STRef] (STRef)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/Data-Unique.html Data.Unique] (Unique)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/Data-Version.html Data.Version] (Version)
*
[http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html/Foreign-C-Error.html
Foreign.C.Error] (Errno)
*
[http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html/Foreign-C-Types.html
Foreign.C.Types] (all of them)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/System-Exit.html System.Exit] (!ExitCode)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/System-IO.html System.IO] (IOMode, !SeekMode, !BufferMode)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/System-IO-Error.html System.IO.Error] (IOErrorType)
* [http://hackage.haskell.org/packages/archive/base/4.1.0.0/doc/html
/System-Mem-StableName.html System.Mem.StableName] (!StableName)
For some types I had to resort to tricks like comparing a value with
itself to force evaluation since I do not have access to all constructors.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3537>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs