Commits

Show all
Author Commit Message Labels Comments Date
Maxime Henrion
Fix the changelog.
Tags
GENERIC_DEEPSEQ_V2_0_1_0_REL
Maxime Henrion
Improve a comment slightly.
Maxime Henrion
It turns out the V1 instance is useful in a few very specific cases, so add it back, but with a correct implementation this time. Update the changelog accordingly.
Maxime Henrion
Simplify comment.
Maxime Henrion
Add a comment explaining why it's important to pattern match on the U1 constructor of the U1 instance.
Maxime Henrion
Bump version to 2.0.1.0 and document changes.
Maxime Henrion
The U1 instance for DeepSeq must pattern match on the U1 constructor instead of using _. Otherwise, deepseq wouldn't diverge when called on (undefined :: T) for some type T without arguments, while seq does. In other words, with this correction, the following now holds: data Unit = Unit deriving Generic instance DeepSeq Unit x `seq` () == x `deepseq` () == _|_ where x = undefined :: Unit
Maxime Henrion
It turns out that the V1 instance isn't necessary, even when we want to derive instances for types that are tagged using other types without constructors (also called phantom types). Those don't make it to the Generic representation. For example, the following code works just fine without a V1 instance: data Tag1 data Tag2 data Foo a = Foo Int foo1 :: Int -> Foo Tag1 foo1 = Foo foo2 :: Int -> Foo Tag2 foo2 = Foo instance DeepSeq (Foo a)
Maxime Henrion
Add LANGUAGE pragma for the PackageImports extension.
Maxime Henrion
Move sources into a sub-directory.
Maxime Henrion
Add a simple benchmark to compare this implementation with the deepseq package.
Maxime Henrion
Added tag GENERIC_DEEPSEQ_V2_0_0_0_REL for changeset 49ffd5000f17
Maxime Henrion
It looks like Hackage won't let me upload a package with an extension still unknown to Cabal (DefaultSignatures), so remove it from here for now.
Tags
GENERIC_DEEPSEQ_V2_0_0_0_REL
Maxime Henrion
Add a changelog.
Maxime Henrion
Tweak the Haddock documentation some more.
Maxime Henrion
Fix the documentation of rnf and deepseq that was still switched, and add documentation for functions that were missing it.
Maxime Henrion
Add an instance for complex numbers.
Maxime Henrion
Bump the version from 1.0.0.0 to 2.0.0.0 after the latest change, that broke the API by changing the name and type signature of the class member function of the DeepSeq class.
Maxime Henrion
Change the function of the DeepSeq class from "deepseq :: a -> b -> b" to a "rnf :: a -> ()" function, just like the NFData class of the original deepseq package, for performance reasons. It turns out that using my seq-like formulation, while strictly equivalent, resulted in code that was 6-7 times slower than the deepseq package. With this change, while the generic-deepseq package is still slower, it at least shows a performance comparable to the old implementation. I intend to run more precise Criterion benchmarks soon.
Maxime Henrion
Properly advertise the required compiler extensions.
Maxime Henrion
Add an instance for functions, for convenience and consistency with seq and the non-generic deepseq package.
Maxime Henrion
Rework the description a bit.
Maxime Henrion
Add an instance for Ratio.
Maxime Henrion
Added tag GENERIC_DEEPSEQ_V1_0_0_0_REL for changeset f81d0986e68e
Maxime Henrion
Cosmetic change.
Tags
GENERIC_DEEPSEQ_V1_0_0_0_REL
Maxime Henrion
More tweaks to the haddock documentation.
Maxime Henrion
Add the Ordering instance back; it might still be useful when some bigger datatype contains one such value. Also, much whitespace churn for the sake of alignment.
Maxime Henrion
Add an additional instance for tuples of 7 elements.
Maxime Henrion
Tweak haddock documentation a bit.
Maxime Henrion
Fix package markup.
  1. Prev
  2. Next