<div dir="ltr">Hi Tom,<div><br></div><div>this indeed led to more questions. I believe that was happening because x is not a list of concrete types. In determining the concrete type of the list GHCI evaluated all values hence </div><div>







<p class="gmail-p1"><span class="gmail-s1">λ> let foo = [1,2,3] :: [Int]</span></p>
<p class="gmail-p1"><span class="gmail-s1">Prelude| </span></p>
<p class="gmail-p1"><span class="gmail-s1">foo :: [Int]</span></p>
<p class="gmail-p1"><span class="gmail-s1">λ> :sprint foo</span></p>
<p class="gmail-p1"><span class="gmail-s1">foo = [1,2,3]</span></p><p class="gmail-p1"><span class="gmail-s1"><br></span></p><p class="gmail-p1"><span class="gmail-s1">I tried on other concrete types like</span> [Char] and String...seems like [Char] is not entire the same as String after all</p></div><div>
<p class="gmail-p1"><span class="gmail-s1">λ> let x = ['a','b','c']</span></p><p class="gmail-p1"><span class="gmail-s1">Prelude| </span></p><p class="gmail-p1"><span class="gmail-s1">x :: [Char]</span></p><p class="gmail-p1"><span class="gmail-s1">λ> let y = "abc"</span></p><p class="gmail-p1"><span class="gmail-s1">Prelude| </span></p><p class="gmail-p1"><span class="gmail-s1">y :: [Char]</span></p><p class="gmail-p1"><span class="gmail-s1">λ> :sprint x</span></p><p class="gmail-p1"><span class="gmail-s1">x = "abc"</span></p><p class="gmail-p1"><span class="gmail-s1">λ> :sprint y</span></p><p class="gmail-p1"><span class="gmail-s1">y = _</span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Oct 9, 2016 at 8:00 PM,  <span dir="ltr"><<a href="mailto:beginners-request@haskell.org" target="_blank">beginners-request@haskell.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Beginners mailing list submissions to<br>
        <a href="mailto:beginners@haskell.org">beginners@haskell.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:beginners-request@haskell.org">beginners-request@haskell.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:beginners-owner@haskell.org">beginners-owner@haskell.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Beginners digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re:  Basic sound playing on Windows? (Tilmann)<br>
   2. Re:  Basic sound playing on Windows? (Cleverson Casarin Uliana)<br>
   3.  Lazy evaluation, trying to find out when its done (Lai Boon Hui)<br>
   4. Re:  Lazy evaluation, trying to find out when its done<br>
      (Tom Murphy)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Sat, 8 Oct 2016 15:19:35 +0200<br>
From: Tilmann <<a href="mailto:t_gass@gmx.de">t_gass@gmx.de</a>><br>
To: The Haskell-Beginners Mailing List - Discussion of primarily<br>
        beginner-level topics related to Haskell <<a href="mailto:beginners@haskell.org">beginners@haskell.org</a>><br>
Subject: Re: [Haskell-beginners] Basic sound playing on Windows?<br>
Message-ID: <<a href="mailto:417e430b-14d5-1bda-217d-1df8e512831d@gmx.de">417e430b-14d5-1bda-217d-<wbr>1df8e512831d@gmx.de</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
I used ALUT on OSX and it worked perfectly. Not used it on windows yet,<br>
but according to the documentation it's supported.<br>
<br>
<br>
Have a look here for how to use it on windows:<br>
<br>
<a href="https://hackage.haskell.org/package/OpenAL" rel="noreferrer" target="_blank">https://hackage.haskell.org/<wbr>package/OpenAL</a><br>
<br>
<br>
and here for some examples:<br>
<br>
<a href="https://github.com/haskell-openal/ALUT/tree/master/examples/Basic" rel="noreferrer" target="_blank">https://github.com/haskell-<wbr>openal/ALUT/tree/master/<wbr>examples/Basic</a><br>
<br>
<br>
Best,<br>
<br>
Tilmann<br>
<br>
<br>
<br>
<br>
Am 06.10.16 um 17:17 schrieb Cleverson Casarin Uliana:<br>
> Hello all, is it easy to play/stop sound wave files on Windows? For<br>
> now I'd like just playing and stopping them assynchronously. Do I need<br>
> to install any package besides Haskell Platform?<br>
><br>
> Thanks,<br>
> Cleverson<br>
> ______________________________<wbr>_________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sat, 8 Oct 2016 10:54:54 -0300<br>
From: Cleverson Casarin Uliana <<a href="mailto:clever97@gmail.com">clever97@gmail.com</a>><br>
To: The Haskell-Beginners Mailing List - Discussion of primarily<br>
        beginner-level topics related to Haskell <<a href="mailto:beginners@haskell.org">beginners@haskell.org</a>><br>
Subject: Re: [Haskell-beginners] Basic sound playing on Windows?<br>
Message-ID: <<a href="mailto:46d55c3c-0c5c-e1e1-c413-1406ec12a56c@gmail.com">46d55c3c-0c5c-e1e1-c413-<wbr>1406ec12a56c@gmail.com</a>><br>
Content-Type: text/plain; charset=utf-8; format=flowed<br>
<br>
Thank you Tilmann, it's quite good.<br>
<br>
Greetings,<br>
Cleverson<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sun, 9 Oct 2016 10:27:22 +0800<br>
From: Lai Boon Hui <<a href="mailto:laiboonh@gmail.com">laiboonh@gmail.com</a>><br>
To: <a href="mailto:beginners@haskell.org">beginners@haskell.org</a><br>
Subject: [Haskell-beginners] Lazy evaluation,   trying to find out when<br>
        its done<br>
Message-ID:<br>
        <<a href="mailto:CAJdQggm7L--6Wb6kdqdDiSExEn10_Q8JwWHexVsUN4-LHmB2hw@mail.gmail.com">CAJdQggm7L--<wbr>6Wb6kdqdDiSExEn10_<wbr>Q8JwWHexVsUN4-LHmB2hw@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi all,<br>
<br>
I understand that the take method will evaluate the value inside the cons<br>
cell whereas length will just evaluate the spine or structure of the list<br>
<br>
λ> let y = "abc"<br>
Prelude|<br>
y :: [Char]<br>
λ> :sprint y<br>
y = _<br>
λ> take 1 y<br>
"a"<br>
it :: [Char]<br>
λ> :sprint y<br>
y = 'a' : _<br>
λ><br>
<br>
Well and good but why doesn't the same work on a list of Nums??<br>
<br>
λ> let x = [1,2,3]<br>
Prelude|<br>
x :: Num t => [t]<br>
λ> :sprint x<br>
x = _<br>
λ> take 1 x<br>
[1]<br>
it :: Num a => [a]<br>
λ> :sprint x<br>
x = _<br>
λ><br>
<br>
I expected to see x = 1 : _<br>
<br>
--<br>
Best Regards,<br>
Boon Hui<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.haskell.org/pipermail/beginners/attachments/20161009/7f08152b/attachment-0001.html" rel="noreferrer" target="_blank">http://mail.haskell.org/<wbr>pipermail/beginners/<wbr>attachments/20161009/7f08152b/<wbr>attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Sun, 9 Oct 2016 00:34:31 -0400<br>
From: Tom Murphy <<a href="mailto:amindfv@gmail.com">amindfv@gmail.com</a>><br>
To: The Haskell-Beginners Mailing List - Discussion of primarily<br>
        beginner-level topics related to Haskell <<a href="mailto:beginners@haskell.org">beginners@haskell.org</a>><br>
Subject: Re: [Haskell-beginners] Lazy evaluation, trying to find out<br>
        when its done<br>
Message-ID: <20161009043431.GB29336@air.<wbr>home><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Maybe this will help answer some questions and raise others:<br>
<br>
 .  let x = [1,2,3]<br>
 .  take 1 x<br>
[1]<br>
 .  :sprint x<br>
x = _<br>
 .  let x = [1,2,3] :: [Int]<br>
 .  take 1 x<br>
[1]<br>
 .  :sprint x<br>
x = [1,2,3]<br>
<br>
Tom<br>
<br>
<br>
On Sun, Oct 09, 2016 at 10:27:22AM +0800, Lai Boon Hui wrote:<br>
> Hi all,<br>
><br>
> I understand that the take method will evaluate the value inside the cons<br>
> cell whereas length will just evaluate the spine or structure of the list<br>
><br>
> λ> let y = "abc"<br>
> Prelude|<br>
> y :: [Char]<br>
> λ> :sprint y<br>
> y = _<br>
> λ> take 1 y<br>
> "a"<br>
> it :: [Char]<br>
> λ> :sprint y<br>
> y = 'a' : _<br>
> λ><br>
><br>
> Well and good but why doesn't the same work on a list of Nums??<br>
><br>
> λ> let x = [1,2,3]<br>
> Prelude|<br>
> x :: Num t => [t]<br>
> λ> :sprint x<br>
> x = _<br>
> λ> take 1 x<br>
> [1]<br>
> it :: Num a => [a]<br>
> λ> :sprint x<br>
> x = _<br>
> λ><br>
><br>
> I expected to see x = 1 : _<br>
><br>
> --<br>
> Best Regards,<br>
> Boon Hui<br>
<br>
> ______________________________<wbr>_________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/beginners</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Beginners Digest, Vol 100, Issue 7<br>
******************************<wbr>***********<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Best Regards,<div>Boon Hui</div></div></div>
</div>