[commit: packages/ghc-prim] master: Add actual documentation for new SPEC type. (8822cfc)

Austin Seipp austin at well-typed.com
Fri Oct 25 14:56:57 UTC 2013


Ah, true. I'm under the impression people don't need to so
aggressively force constructor specialization except in some rare
cases, but I'll add a note to the user manual (there are some notes on
SpecConstr there.)

It doesn't look like there's documentation for ForceSpecConstr, but
that's OK - presumably we can just not mention it, and encourage
people will use the new type instead.

On Fri, Oct 25, 2013 at 9:52 AM, Simon Peyton-Jones
<simonpj at microsoft.com> wrote:
> Austin, I think this needs a pointer to this in the user manual.  I wouldn't look in GHC.Types when fiddling with SpecConstr!
>
> Simon
>
> | -----Original Message-----
> | From: ghc-commits [mailto:ghc-commits-bounces at haskell.org] On Behalf Of
> | git at git.haskell.org
> | Sent: 25 October 2013 15:34
> | To: ghc-commits at haskell.org
> | Subject: [commit: packages/ghc-prim] master: Add actual documentation
> | for new SPEC type. (8822cfc)
> |
> | Repository : ssh://git@git.haskell.org/ghc-prim
> |
> | On branch  : master
> | Link       :
> | http://ghc.haskell.org/trac/ghc/changeset/8822cfce44a3197f6f418563723c9c
> | c4760e8db9/ghc-prim
> |
> | >---------------------------------------------------------------
> |
> | commit 8822cfce44a3197f6f418563723c9cc4760e8db9
> | Author: Austin Seipp <austin at well-typed.com>
> | Date:   Fri Oct 25 09:33:49 2013 -0500
> |
> |     Add actual documentation for new SPEC type.
> |
> |     Signed-off-by: Austin Seipp <austin at well-typed.com>
> |
> |
> | >---------------------------------------------------------------
> |
> | 8822cfce44a3197f6f418563723c9cc4760e8db9
> |  GHC/Types.hs |    8 +++++++-
> |  1 file changed, 7 insertions(+), 1 deletion(-)
> |
> | diff --git a/GHC/Types.hs b/GHC/Types.hs
> | index 0e03143..4f97215 100644
> | --- a/GHC/Types.hs
> | +++ b/GHC/Types.hs
> | @@ -155,5 +155,11 @@ isTrue# x = tagToEnum# x
> |  -- you're reading this in 2023 then things went wrong). See #8326.
> |  --
> |
> | --- | Lorem ipsum...
> | +-- | SPEC is used by GHC in the @SpecConstr@ pass in order to inform
> | +-- the compiler when to be particularly aggressive. In particular, it
> | +-- tells GHC to specialize regardless of size or the number of
> | +-- specializations. However, not all loops fall into this category.
> | +--
> | +-- Libraries can specify this by using 'SPEC' data type to inform which
> | +-- loops should be aggressively specialized.
> |  data SPEC = SPEC | SPEC2
> |
> | _______________________________________________
> | ghc-commits mailing list
> | ghc-commits at haskell.org
> | http://www.haskell.org/mailman/listinfo/ghc-commits
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-devs
>



-- 
Regards,

Austin Seipp, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


More information about the ghc-devs mailing list