Skip to content

Commit

Permalink
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed Dec 7, 2012
2 parents 86e2a2a + 4f7027d commit c1c2d84
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/typecheck/TcGenGenerics.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ canDoGenerics1_w rep_tc
check_vanilla :: DataCon -> Maybe SDoc
check_vanilla con | isVanillaDataCon con = Nothing
| otherwise = Just (bad con existential)
| otherwise = Just (bad con existential)
-- the Bool is if the parameter occurs in the type
ft_check :: DataCon -> FFoldType (Bool, S.State [Name] (Maybe SDoc))
Expand All @@ -306,7 +306,7 @@ canDoGenerics1_w rep_tc
-- applications, so we must compensate with extra logic
-- to ensure that the variable only occurs as the last
-- argument.
, ft_fun = \x y -> if fst x then (True, return $ Just $ bad con wrong_arg)
, ft_fun = \x y -> if fst x then (True, return $ Just $ bad con wrong_arg)
else x `bmplus` y
, ft_tup = \_ xs ->
if not (null xs) && any fst (init xs)
Expand Down
8 changes: 8 additions & 0 deletions docs/users_guide/flags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1739,6 +1739,14 @@
<entry><option>-fno-unbox-strict-fields</option></entry>
</row>

<row>
<entry><option>-funbox-strict-primitive-fields</option></entry>
<entry>Flatten strict constructor fields with a
pointer-sized representation</entry>
<entry>dynamic</entry>
<entry><option>-fno-unbox-strict-primitive-fields</option></entry>
</row>

<row>
<entry><option>-funfolding-creation-threshold</option></entry>
<entry>Tweak unfolding settings</entry>
Expand Down
25 changes: 25 additions & 0 deletions docs/users_guide/using.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,31 @@ f "2" = 2
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-funbox-strict-primitive-fields</option>:
<indexterm><primary><option>-funbox-strict-primitive-fields</option></primary></indexterm>
<indexterm><primary>strict constructor fields</primary></indexterm>
<indexterm><primary>constructor fields, strict</primary></indexterm>
</term>
<listitem>
<para>This option causes all constructor fields which are marked
strict (i.e. &ldquo;!&rdquo;) and which representation is smaller or
equal to the size of a pointer to be unpacked if possible. It is
equivalent to adding an <literal>UNPACK</literal> pragma to every
strict constructor field that fullfills the size restriction. (see
<xref linkend="unpack-pragma"/>).
</para>

<para>This option is less of a sledgehammer than
<option>-funbox-strict-fields</option>: it should rarely make things
worse. If you use <option>-funbox-strict-primitive-fields</option>
to turn on unboxing by default you can disable it for certain
constructor fields using the <literal>NOUNPACK</literal> pragma (see
<xref linkend="nounpack-pragma"/>).</para>
</listitem>
</varlistentry>

<varlistentry>
<term>
<option>-fspec-constr</option>
Expand Down

0 comments on commit c1c2d84

Please sign in to comment.