Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/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: Why does sequence (map print [1, 2, 3, 4, 5]) produce
[(), (), (), (), ()] at the end? (David McBride)
2. Re: generating object file for ARM (Henk-Jan van Tuyl)
----------------------------------------------------------------------
Message: 1
Date: Wed, 3 Feb 2016 08:11:34 -0500
From: David McBride <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Why does sequence (map print [1, 2,
3, 4, 5]) produce [(), (), (), (), ()] at the end?
Message-ID:
<can+tr4058alh4d4_xgakbsrp0s3ayofzmqkgtlykai5luoo...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
In ghci, any statement that returns Show a => IO a (that is IO a where the
a is showable) will be run in IO and the result a will be shown once it
finishes. If a is not showable it will simply run the IO action, but not
show the result.
> :t sequence (map print [1,2,3])
sequence (map print [1,2,3]) :: IO [()]
> :i Show
instance Show a => Show [a] -- Defined in ?GHC.Show?
instance Show () -- Defined in ?GHC.Show?
On Wed, Feb 3, 2016 at 5:35 AM, Olumide <[email protected]> wrote:
> On 01/02/2016 17:39, David McBride wrote:
>
>> Note that it has not actually printed them out.
>>
>
> I hope you don't mind me asking but why then does sequence (map print
> [1,2,3] ) return the numbers 1, 2, 3 (albeit followed by [(),(),()]).
>
> It merely has an array of as yet unexecuted actions. To print them
>> you'd go like sequence (map print) [1,2,3] ...
>>
>
> Erm ... sequence (map print) [1,2,3] returns an error.
>
>
> - Olumide
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20160203/4cacdb25/attachment-0001.html>
------------------------------
Message: 2
Date: Thu, 04 Feb 2016 11:59:40 +0100
From: "Henk-Jan van Tuyl" <[email protected]>
To: "Haskell Beginners" <[email protected]>, "Fabien R"
<[email protected]>
Subject: Re: [Haskell-beginners] generating object file for ARM
Message-ID: <op.yca15uxopz0j5l@alquantor>
Content-Type: text/plain; charset=iso-8859-15; format=flowed;
delsp=yes
On Sun, 31 Jan 2016 21:53:22 +0100, Fabien R <[email protected]> wrote:
> Hello,
>
> I would like to link my Haskell module with existing object files for
> armv7-m. I use ghc 7.4.1 on debian/amd64.
>
> This command seems incorrect:
> ghc -pgmcarm-none-eabi-gcc -pgmParm-none-eabi-cpp -pgmaarm-none-eabi-as
> -pgmlarm-none-eabi-ld -keep-tmp-files HaskellModule.hs
>
> A lot of errors appeared:
[...]
Hello Fabien,
If you are still interested in an answer, you could try asking the Haskell
Caf?, as there are more people on that list.
Regards,
Henk-Jan van Tuyl
--
Folding@home
What if you could share your unused computer power to help find a cure? In
just 5 minutes you can join the world's biggest networked computer and get
us closer sooner. Watch the video.
http://folding.stanford.edu/
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
Haskell programming
--
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 92, Issue 6
****************************************