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. Correction needed in Real World Haskell, chapter 24
(Concurrency and Parallelism)? (Obscaenvs)
2. Getting Haddock to Link Against Dependencies (Alec Story)
----------------------------------------------------------------------
Message: 1
Date: Tue, 07 Aug 2012 12:22:10 +0200
From: Obscaenvs <[email protected]>
Subject: [Haskell-beginners] Correction needed in Real World Haskell,
chapter 24 (Concurrency and Parallelism)?
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
At
http://book.realworldhaskell.org/read/concurrent-and-multicore-programming.html#id675459
, just after the code for `sillySort`, it says
<quote>
"In this mistaken example, we evaluate each sorted sublist to WHNF.
Since the outermost constructor in each case is just a single list
constructor, we are in fact only forcing the evaluation of the first
element of each sorted sublist! Every other element of each list remains
unevaluated."
</quote>
My ruminations on the subject ended up in the following analysis, which
is quite contrary to that of the authors':
In the general case of the type inside the list being just an instance
of Ord, it is *not* the case that the first element is necessarily
evaluated; it is evaluated just enough (along with the elements of the
*rest* of the lists greater and lesser) to enable < and >= to do their
job inside the list comprehensions. Now, if these elements are Int:s or
Integer:s then certainly, yes, the first element *is* evaluated, but so
is the rest of the elements of the lists greater and lesser.
So, greater and lesser are not only reduced to WHNF, but to NF in the
case of sillySort working on [Int] or [Integer].
Am I mistaken in my analysis? If so, where?
/Fredrik
--
haskellBlog: http://www.monoid.se/categories/haskell/
------------------------------
Message: 2
Date: Tue, 7 Aug 2012 13:37:21 -0400
From: Alec Story <[email protected]>
Subject: [Haskell-beginners] Getting Haddock to Link Against
Dependencies
To: [email protected]
Message-ID:
<cakcn5spnwvy-uckcxdb2rzrhjkdywemnuy8z6dpvpxrsplk...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I'm trying to use haddock on a module I'm building, and while cabal
haddockgenerates the documentation I want, it won't link to
documentation of
dependencies (for example, Data.Word in base).
Instead, I get messages like:
Warning: My.Module: could not find link destinations for:
GHC.Types.IO Control.Concurrent.Chan.Chan
Data.ByteString.Lazy.Internal.ByteString GHC.Classes.Eq GHC.Classes.Ord
GHC.Show.Show Data.Monoid.Monoid GHC.Word.Word16 GHC.Word.Word8
GHC.Word.Word32 GHC.Types.Int GHC.Integer.Type.Integer GHC.Word.Word64
GHC.Enum.Enum Data.Binary.Binary Data.Maybe.Maybe
I've had this working before, but I just moved to a different computer.
I'd like to have the documentation available so that I can keep working
even if I go offline. Any idea of how to fix this? I can compile and run
the code fine, so the dependencies are installed.
--
Alec Story
Cornell University
Biological Sciences, Computer Science 2012
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120807/3b4eb816/attachment-0001.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 50, Issue 8
****************************************