Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: How to construct complex string (Stephen Tetley)
2. Why is my GHC bigger than the distribution (vold)
3. Re: Why is my GHC bigger than the distribution (vold)
4. Re: Why is my GHC bigger than the distribution (vold)
----------------------------------------------------------------------
Message: 1
Date: Tue, 6 Aug 2013 18:01:45 +0100
From: Stephen Tetley <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How to construct complex string
Message-ID:
<CAB2TPRCmKXo-zgTub6uc01jBmxKVeJOfOtMzpWA6YrTWVquF=q...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Martin
If you are building syntax as a sequence of commands (or statements) a
common idiom is to collect them with a Writer monad.
Andy Gill's Dotgen on Hackage is a nice realization of this idiom. See the
how example included in the package has acceptably nice syntax without
obliging the implementation to use complex facilities such as Template
Haskell.
In the source code, the data type GraphElement represents the main
statement types in GraphViz's "dot" language.
The data type Dot is the monad - here a combination of a Writer monad and a
State monad, with the State monad supplying unique integers for fresh
identifiers. The monad is written as a direct combination of State and
Writer (it is perhaps more common to rely on _monad transformers_ but once
you know what you are looking at, Andy's code is simple and clear).
http://hackage.haskell.org/package/dotgen
Best wishes
Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130806/f5d3e94f/attachment-0001.html>
------------------------------
Message: 2
Date: Wed, 7 Aug 2013 07:23:34 +0000 (UTC)
From: vold <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Why is my GHC bigger than the
distribution
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
I've built GHC 7.6.3 from source using the default "perf" settings, and all
my programs are about 4 Mb bigger after linking than if I used the pre-built
binary. What could be causing this? (x64 Linux with gold linker.)
------------------------------
Message: 3
Date: Wed, 7 Aug 2013 07:33:10 +0000 (UTC)
From: vold <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Why is my GHC bigger than the
distribution
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
vold <voldermort <at> hotmail.com> writes:
Sorry, that wasn't completely clear. It's both the GHC binary itself and
everything build by GHC which is a few MB bigger.
------------------------------
Message: 4
Date: Wed, 7 Aug 2013 08:00:15 +0000 (UTC)
From: vold <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Why is my GHC bigger than the
distribution
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
vold <voldermort <at> hotmail.com> writes:
Now I've noticed something even weirder - if I replace the GHC binary from
the binary distribution with the one I built, the executables I produce with
it are the original size.
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 62, Issue 4
****************************************