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: [Haskell-cafe] ghc --make Vs runhaskell (Brandon Allbery)
2. Couldn't match expected type ?IO ()? with actual type
[Integer] (Roelof Wobben)
3. Re: Couldn't match expected type ?IO ()? with actual type
[Integer] (Max Voit)
----------------------------------------------------------------------
Message: 1
Date: Wed, 4 Feb 2015 22:45:30 -0500
From: Brandon Allbery <[email protected]>
To: "Richard A. O'Keefe" <[email protected]>
Cc: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>,
haskell-cafe <[email protected]>
Subject: Re: [Haskell-beginners] [Haskell-cafe] ghc --make Vs
runhaskell
Message-ID:
<cakfcl4ufejp6bvblnb9kc3hao30+yz_r2ug6ppybhpzenwf...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Wed, Feb 4, 2015 at 10:10 PM, Richard A. O'Keefe <[email protected]>
wrote:
> Given things like sockets, STREAMS, and ptys, I am not
> sure that it is _possible_ for a Unix system to determine whether two
> streams
> are or are not "related" reliably.
>
It's not. I was not implying that it was, or that it was even a good idea
to try to do so. On the other hand, flushing *every* line-buffered FILE is
rather overkill but less heinous than highly dubious and untestable
assumptions about relationships.
--
brandon s allbery kf8nh sine nomine associates
[email protected] [email protected]
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150204/d78980e1/attachment-0001.html>
------------------------------
Message: 2
Date: Thu, 05 Feb 2015 12:37:12 +0100
From: Roelof Wobben <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] Couldn't match expected type ?IO ()? with
actual type [Integer]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20150205/c6de8a70/attachment-0001.html>
------------------------------
Message: 3
Date: Thu, 5 Feb 2015 13:01:50 +0100
From: Max Voit <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Couldn't match expected type ?IO ()?
with actual type [Integer]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
Hi Roelof,
On Thu, 05 Feb 2015 12:37:12 +0100
Roelof Wobben <[email protected]> wrote:
> main :: IO ()
> main = do
> ??? toDigits 123
> src/Main.hs@14:5-14:17
> Couldn't match expected type ?IO ()? with actual type
> [Integer]
> ? In a stmt of a 'do' block: toDigits 123 In the expression: do
> { toDigits 123 }
since your do block consists only of one expression,
actually your main looks like:
main :: IO ()
main = toDigits 123
Perhaps this explains where the problem lies.
Considering, however, do-notation: The last statement of a do-block
needs to be an expression of the type of the do-block. Translating
do-notation to bind operator sequences[1] may be helpful in
understanding this.
best,
Max
[1] http://en.wikibooks.org/wiki/Haskell/do_notation
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 80, Issue 4
****************************************