<div dir="ltr">Hm. Then I bet that's the implicit Typeable derivation and there's nothing to be done about it because it's used internally.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 19, 2021 at 10:58 AM Viktor Dukhovni <<a href="mailto:ietf-dane@dukhovni.org">ietf-dane@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sun, Sep 19, 2021 at 07:58:22AM -0400, Brandon Allbery wrote:<br>
<br>
> On Sun, Sep 19, 2021 at 3:02 AM Viktor Dukhovni <<a href="mailto:ietf-dane@dukhovni.org" target="_blank">ietf-dane@dukhovni.org</a>><br>
> wrote:<br>
><br>
> > I don't know how to suppress unexported constructor names appearing in the<br>
> > compiled code, perhaps someone else does, or it might not be possible...<br>
><br>
> I would ask if there's a "deriving Show" involved.<br>
<br>
My test code does not.<br>
<br>
$ rm foo.o foo.hi<br>
$ ghc -fhide-source-paths -dno-typeable-binds -dsuppress-type-signatures -optl-s -O2 foo.hs<br>
[1 of 1] Compiling Main<br>
Linking foo ...<br>
$ strings -a foo | grep -i secret<br>
main:Main.AnotherSecret<br>
<br>
$ cat foo.hs<br>
module Main (main) where<br>
<br>
import System.Environment<br>
import Data.Maybe<br>
<br>
data SecretName = AnotherSecret String Int<br>
<br>
secretName :: [String] -> Maybe SecretName<br>
secretName = fmap (AnotherSecret <$> id <*> (+ 42) . read) . listToMaybe<br>
{-# NOINLINE secretName #-}<br>
<br>
main :: IO ()<br>
main = secretName <$> getArgs >>= mapM_ (\ (AnotherSecret a b) -> print (a, b))<br>
<br>
With a deriving (Show) instance, I see a second occurence:<br>
<br>
main:Main.AnotherSecret<br>
AnotherSecret<br>
<br>
-- <br>
Viktor.<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>