<br><br><div class="gmail_quote">On Sun, Dec 6, 2009 at 4:53 AM,  <span dir="ltr">&lt;<a href="mailto:haskell-cafe-request@haskell.org">haskell-cafe-request@haskell.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Send Haskell-Cafe mailing list submissions to<br>
        <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:haskell-cafe-request@haskell.org">haskell-cafe-request@haskell.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:haskell-cafe-owner@haskell.org">haskell-cafe-owner@haskell.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Haskell-Cafe digest...&quot;<br>
<br>Today&#39;s Topics:<br>
<br>
   1. Re: Low Level Audio - Writing bytes to the sound card?<br>
      (Daniel Fischer)<br>
   2. Re: HP + Gtk2hs? (M Xyz)<br>
   3. Re: Low Level Audio - Writing bytes to the sound card? (M Xyz)<br>
   4. Re: Low Level Audio - Writing bytes to the sound card?<br>
      (Daniel Fischer)<br>
   5. RE: Low Level Audio - Writing bytes to the sound card? (john lask)<br>
   6. Re: New Hackage category: Error Handling (Henning Thielemann)<br>
   7. Re: Low Level Audio - Writing bytes to the sound card? (M Xyz)<br>
   8. RE: Low Level Audio - Writing bytes to the sound card? (M Xyz)<br>
   9. PortAudio library successfully built on Windows (M Xyz)<br>
  10. When are undecidables ok? (Michael Snoyman)<br>
  11. Re: When are undecidables ok? (Luke Palmer)<br>
  12. Re: When are undecidables ok? (Michael Snoyman)<br>
  13. Re: ANNOUNCE:  error-message (Ariel J. Birnbaum)<br>
  14. Re: What is the rank of a polymorphic type? (Eugene Kirpichov)<br>
  15. Re: universal binary version of Haskell Platform?<br>
      (Benjamin L.Russell)<br>
  16. Re: What is the rank of a polymorphic type? (Dan Doel)<br>
  17. Re[2]: [Haskell-cafe] Low Level Audio - Writing bytes to the<br>
      sound     card? (Bulat Ziganshin)<br>
  18. Re: universal binary version of Haskell Platform?<br>
      (Heinrich Apfelmus)<br>
  19. Re: Low Level Audio - Writing bytes to the sound card?<br>
      (Andrew Coppin)<br>
  20. Re: binding to C libraries on Windows was Low Level       Audio -<br>
      Writing bytes to the sound card? (Andrew Coppin)<br>
<br><br>---------- Forwarded message ----------<br>From: Daniel Fischer &lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>

Date: Sun, 6 Dec 2009 01:24:17 +0100<br>Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>Am Sonntag 06 Dezember 2009 00:47:38 schrieb M Xyz:<br>
&gt; Daniel, Thank you for your thoughtful reply. I didn&#39;t know about those<br>
&gt; flags. The log is fairly long, and as I&#39;m new to Haskell and Cabal it is<br>
&gt; mostly meaningless to me. I see very many incidences of &quot;searching for ___<br>
&gt; in path. Cannot find ___ on the path&quot; so maybe this is all as simple as me<br>
&gt; not setting my environment correctly.<br>
<br>
If you have cpphs, hugs, jhc, greencard etc., it is probably something about your<br>
environment. If you don&#39;t have them, it&#39;s clear that they aren&#39;t found.<br>
<br>
On the other hand, that doesn&#39;t explain<br>
<br>
Using c2hs version 0.16.0 given by user at: C:\Program<br>
Files\Haskell\bin\c2hs.exe<br>
<br>
-- so it finds c2hs, and can apparently run c2hs --version<br>
<br>
(&quot;C:\\Program Files\\Haskell\\bin\\c2hs.exe&quot;,[&quot;--include=dist\\build&quot;,&quot;--cppopts=-<br>
D__GLASGOW_HASKELL__=610&quot;,&quot;--cppopts=-IC:<br>
\\A\\install\\programming\\portaudio\\portaudio\\include&quot;,&quot;--output-dir=dist\\build&quot;,&quot;--<br>
output=Sound\\PortAudio\\Base.hs&quot;,&quot;.\\Sound\\PortAudio\\Base.chs&quot;])<br>
c2hs.exe: does not exist<br>
C:\Program Files\Haskell\bin\c2hs.exe returned ExitFailure 1<br>
<br>
-- bang<br>
<br>
To ascertain whether c2hs works at all, can you try to run it manually?<br>
<br>
(cd to an appropriate directory,<br>
<br>
cabal unpack portaudio<br>
<br>
cd portaudio (or whatever, so that Base.chs is found via .\Sound\PortAudio\Base.chs<br>
<br>
md dist\build<br>
<br>
c2hs.exe  --include=dist\build --cppopts=-D__GLASGOW_HASKELL__=610 --cppopts=-IC:<br>
\A\install\programming\portaudio\portaudio\include --output-dir=dist\build --<br>
output=Sound\PortAudio\Base.hs .\Sound\PortAudio\Base.chs<br>
)<br>
If that works, the problem is somewhere in cabal, otherwise in c2hs, either way, we&#39;ll<br>
know more.<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>, Andrew Coppin &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt;<br>

Date: Sat, 5 Dec 2009 16:34:52 -0800 (PST)<br>Subject: Re: [Haskell-cafe] HP + Gtk2hs?<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

<br><br>--- On <b>Sat, 12/5/09, Andrew Coppin <i>&lt;<a href="mailto:andrewcoppin@btinternet.com" target="_blank">andrewcoppin@btinternet.com</a>&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">

&gt;&gt; Hell, I even followed a C++ guide to Win32 programming and<br><div>&gt;&gt; managed to translate an &quot;open a blank window&quot; program to Haskell, and it<br>&gt;&gt; worked. Maybe somebody just needs to sit down and write a nice binding<br>

&gt;&gt; for doing native GUI stuff under Win32?<br><br></div></blockquote>Well there&#39;s <a href="http://haskell.org/ghc/docs/latest/html/libraries/Win32/Graphics-Win32.html" target="_blank">http://haskell.org/ghc/docs/latest/html/libraries/Win32/Graphics-Win32.html</a> for opening blank windows. ;)<br>

<br>This relates to my question a couple days ago about a good cross platform 2d library. I wonder why there isnt a Haskell library that follows in the footsteps of Java&#39;s Swing - by that I mean, just have a very
 simple low level way of opening a window, getting mouse clicks, and an abstracted drawing layer... and make the GUIs with that. The GUIs are drawn and not OS widgets. That&#39;s exactly why I was looking for something like Cairo. My interest is in composable fudgets (stealing the word from fudgets). <br>

<br>This way every platform can share the same GUI library and HP can ship with the minimal tools to open a window and draw on every system. Plus OS guis are the wrong thing for Haskell. You need to retain the power to make better abstractions.<br>

<br><div><br></div></td></tr></tbody></table><br>

      <br><br>---------- Forwarded message ----------<br>From: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>, Daniel Fischer &lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;<br>

Date: Sat, 5 Dec 2009 16:49:49 -0800 (PST)<br>Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

<br><br>--- On <b>Sat, 12/5/09, Daniel Fischer <i>&lt;<a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a>&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">

<br><div><br>If you have cpphs, hugs, jhc, greencard etc., it is probably something about your <br>environment. If you don&#39;t have them, it&#39;s clear that they aren&#39;t found.<br><br></div></blockquote>I don&#39;t know what those things are. I have nothing but what came with HP other than installing c2hs today. <br>

<div><br></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div>If that works, the problem is somewhere in cabal, otherwise in c2hs, either way, we&#39;ll <br>know more.<br>

<br></div></blockquote>Alright, I followed the instructions and everything was as you
 said. I still get &quot;c2hs.exe does not exist&quot;.<br>
<br>
C:\A\install\programming\portaudio\haskell\portaudio-0.0.1&gt;&quot;C:\Program Files\Has<br>
kell\bin\c2hs.exe&quot; --include=dist\build --cppopts=-D__GLASGOW_HASKELL__=610 --cp<br>
popts=-IC:\A\install\programming\portaudio\portaudio\include --output-dir=dist\b<br>
uild --output=Sound\PortAudio\Base.hs .\Sound\PortAudio\Base.chs<br>
c2hs.exe: does not exist<br>
<br>
C:\A\install\programming\portaudio\haskell\portaudio-0.0.1&gt;pause<br>
Press any key to continue . . .<br><br>By the way, I have posted this problem to the c2hs mailing list in case they have some insight.<br><div><br></div></td></tr></tbody></table><br>

      <br><br>---------- Forwarded message ----------<br>From: Daniel Fischer &lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;<br>To: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>

Date: Sun, 6 Dec 2009 02:34:17 +0100<br>Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz:<br>
<br>
I just had another idea.<br>
<br>
dafis@linux-mkk1:~&gt; c2hs -o memyself.hs memyself.chs<br>
c2hs: does not exist<br>
<br>
it&#39;s not that c2hs isn&#39;t found or something, c2hs doesn&#39;t find Base.chs!<br>
<br>
Try installing from the unpacked sources (cd portaudio; cabal install) or the old-<br>
fashioned way:<br>
<br>
cd portaudio-0.0.1<br>
<br>
ghc --make Setup<br>
<br>
./Setup configure --help<br>
(choose your options, prefix, profiling, ...)<br>
<br>
./Setup configure $OPTIONS<br>
./Setup build<br>
<br>
if all&#39;s well,<br>
<br>
./Setup haddock<br>
./Setup install<br>
<br>
(dies for me with<br>
dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder<br>
Verzeichnisnicht gefunden<br>
c2hs: Error during preprocessing custom header file<br>
cabal: Error: some packages failed to install:<br>
portaudio-0.0.1 failed during the building phase. The exception was:<br>
exit: ExitFailure 1<br>
because I don&#39;t have portaudio installed)<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: john lask &lt;<a href="mailto:jvlask@hotmail.com">jvlask@hotmail.com</a>&gt;<br>To: &lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;, &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>

Date: Sun, 6 Dec 2009 02:03:32 +0000<br>Subject: RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>



<div>
<br><br>I don&#39;t know whether this will help you but I just downloaded an built<br>the haskell portaudio package ... (I had a windows msvc build of<br>portaudio dll already) the process I used ... ghc 6.10.4, portaudio-19<br>

<br>make an import lib for ghc from dll:<br>pexports libpa19.dll &gt; libpa19.def<br>dlltool --input-def libpa19.def --output-lib libpa19.a<br><br>edit the .cabal file or use command line flags<br><br>  extra-Libraries: pa19<br>

  extra-lib-dirs: c:\portaudio19\lib<br>  include-dirs:   c:\portaudio19\include<br><br> runghc setup configure<br><br>make sure you have cpp i.e. the c-preprocessor on your exe path,<br>otherwise you will get<br>&#39;cpp&#39; is not recognized as an internal or external command,<br>

operable program or batch file.<br>c2hs.exe: Error during preprocessing custom header file<br><br>runghc setup build<br><br>builds ok ...??<br><br><br>&gt; From: <a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a><br>

&gt; To: <a href="mailto:functionallyharmonious@yahoo.com" target="_blank">functionallyharmonious@yahoo.com</a><br>&gt; Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>&gt; Date: Sun, 6 Dec 2009 02:34:17 +0100<br>

&gt; CC: <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br>&gt; <br>&gt; Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz:<br>&gt; <br>&gt; I just had another idea.<br>&gt; <br>&gt; dafis@linux-mkk1:~&gt; c2hs -o memyself.hs memyself.chs<br>

&gt; c2hs: does not exist<br>&gt; <br>&gt; it&#39;s not that c2hs isn&#39;t found or something, c2hs doesn&#39;t find Base.chs!<br>&gt; <br>&gt; Try installing from the unpacked sources (cd portaudio; cabal install) or the old-<br>

&gt; fashioned way:<br>&gt; <br>&gt; cd portaudio-0.0.1<br>&gt; <br>&gt; ghc --make Setup<br>&gt; <br>&gt; ./Setup configure --help<br>&gt; (choose your options, prefix, profiling, ...)<br>&gt; <br>&gt; ./Setup configure $OPTIONS<br>

&gt; ./Setup build<br>&gt; <br>&gt; if all&#39;s well,<br>&gt; <br>&gt; ./Setup haddock<br>&gt; ./Setup install<br>&gt; <br>&gt; (dies for me with<br>&gt; dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder <br>

&gt; Verzeichnisnicht gefunden<br>&gt; c2hs: Error during preprocessing custom header file<br>&gt; cabal: Error: some packages failed to install:<br>&gt; portaudio-0.0.1 failed during the building phase. The exception was:<br>

&gt; exit: ExitFailure 1<br>&gt; because I don&#39;t have portaudio installed)<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>&gt; <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>

&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>                                               <br><hr>Australia&#39;s #1 job site <a href="http://clk.atdmt.com/NMN/go/157639755/direct/01/" target="_blank">If It Exists, You&#39;ll Find it on SEEK</a></div>


<br><br>---------- Forwarded message ----------<br>From: Henning Thielemann &lt;<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>&gt;<br>To: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>

Date: Sun, 06 Dec 2009 03:05:30 +0100 (CET)<br>Subject: Re: [Haskell-cafe] New Hackage category: Error Handling<br><br>
On Sat, 5 Dec 2009, Henning Thielemann wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sun, 6 Dec 2009, Michael Snoyman wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think there are plenty of examples like web servers. A text editor with plugins? I<br>
don&#39;t want to lose three hours worth of work just because some plugin wasn&#39;t written<br>
correctly. For many classes of programs, the distinction between error and exception is<br>
not only blurred, it&#39;s fully irrelevant. Harping on people every time they use error in<br>
the &quot;wrong&quot; sense seems unhelpful.<br>
<br>
Hope my commenting on this subject doesn&#39;t become my own form of *pedantry*.<br>
</blockquote>
<br>
In an earlier thread I have explained that one can consider a software architecture as divided into levels. What is an error in one level (text editor plugin, web server thread, operating system process) is an exception in the next higher level (text editor, web server, shell respectively). This doesn&#39;t reduce the importance to distinguish between errors and exceptions within one level. All approaches so far that I have seen in Haskell just mix exceptions and errors in an arbitrary way.<br>


</blockquote>
<br>
<br>
I have just written more details on this topic:<br>
   <a href="http://www.haskell.org/haskellwiki/Error_vs._Exception" target="_blank">http://www.haskell.org/haskellwiki/Error_vs._Exception</a><br>
<br>
<br><br>---------- Forwarded message ----------<br>From: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>To: Daniel Fischer &lt;<a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>&gt;<br>

Date: Sat, 5 Dec 2009 18:08:07 -0800 (PST)<br>Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

<br><br>--- On <b>Sat, 12/5/09, Daniel Fischer <i>&lt;<a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a>&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">

<br><div><br>cd portaudio-0.0.1<br><br>ghc --make Setup<br><br>./Setup configure --help<br>(choose your options, prefix, profiling, ...)<br><br>./Setup configure $OPTIONS<br>./Setup build<br><br></div></blockquote><br>Everything went well until &quot;Setup build&quot; which yielded our friend &quot;c2hs.exe does not exist&quot;.<br>

<br><br>C:\A\install\programming\portaudio\haskell\portaudio-0.0.1&gt;ghc --make Setup<br>[1 of 1] Compiling Main             ( Setup.hs, Setup.o )<br>Linking Setup.exe ...<br><br>C:\A\install\programming\portaudio\haskell\portaudio-0.0.1&gt;Setup configure --hel<br>

p<br>Usage:
 Setup configure [FLAGS]<br><br>Flags for configure: .......(edited out).................<br><br>C:\A\install\programming\portaudio\haskell\portaudio-0..0.1&gt;Setup configure --ext<br>ra-include-dirs=&quot;C:\A\install\programming\portaudio\portaudio\include&quot; --extra-l<br>

ib-dirs=&quot;C:\A\install\programming\portaudio\portaudio\build\msvc\Win32\Release&quot;<br>Configuring portaudio-0.0.1...<br><br>C:\A\install\programming\portaudio\haskell\portaudio-0.0.1&gt;Setup build<br>Preprocessing library portaudio-0.0.1...<br>

c2hs.exe: does not exist<br><br><br><div><br></div></td></tr></tbody></table><br>

      <br><br>---------- Forwarded message ----------<br>From: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>To: <a href="mailto:daniel.is.fischer@web.de">daniel.is.fischer@web.de</a>, john lask &lt;<a href="mailto:jvlask@hotmail.com">jvlask@hotmail.com</a>&gt;<br>

Date: Sat, 5 Dec 2009 18:17:29 -0800 (PST)<br>Subject: RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

I am going to give this a try. Thanks.<br>Where can I get the pexports and dlltool utilities?<br><br>Google yields:<br><a href="http://www.emmestech.com/software/pexports-0.43/download_pexports.html" target="_blank">http://www.emmestech.com/software/pexports-0.43/download_pexports.html</a><br>

<a href="http://sourceware.org/binutils/" target="_blank">http://sourceware.org/binutils/</a><br><br>Are those correct?<br><br>--- On <b>Sat, 12/5/09, john lask <i>&lt;<a href="mailto:jvlask@hotmail.com" target="_blank">jvlask@hotmail.com</a>&gt;</i></b> wrote:<br>

<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: john lask &lt;<a href="mailto:jvlask@hotmail.com" target="_blank">jvlask@hotmail.com</a>&gt;<br>Subject: RE: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>

To: <a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a>, <a href="mailto:functionallyharmonious@yahoo.com" target="_blank">functionallyharmonious@yahoo.com</a><br>Cc: <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br>

Date: Saturday, December 5, 2009, 9:03 PM<br><br><div>


<br><br>I don&#39;t know whether this will help you but I just downloaded an built<br>the haskell portaudio package ... (I had a windows msvc build of<br>portaudio dll already) the process I used ... ghc 6.10.4, portaudio-19<br>

<br>make an import lib for ghc from dll:<br>pexports libpa19.dll &gt; libpa19.def<br>dlltool --input-def libpa19.def --output-lib libpa19.a<br><br>edit the .cabal file or use command line flags<br><br>  extra-Libraries: pa19<br>

  extra-lib-dirs: c:\portaudio19\lib<br>  include-dirs:   c:\portaudio19\include<br><br> runghc setup configure<br><br>make sure you have cpp i.e. the c-preprocessor on your exe path,<br>otherwise you will get<br>&#39;cpp&#39; is not recognized as an internal or external command,<br>

operable program or batch file.<br>c2hs.exe: Error during preprocessing custom header file<br><br>runghc setup build<br><br>builds ok ...??<br><br><br>&gt; From: <a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a><br>

&gt; To:
 <a href="mailto:functionallyharmonious@yahoo.com" target="_blank">functionallyharmonious@yahoo.com</a><br>&gt; Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>&gt; Date: Sun, 6 Dec 2009 02:34:17 +0100<br>

&gt; CC: <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br>&gt; <br>&gt; Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz:<br>&gt; <br>&gt; I just had another idea.<br>&gt; <br>&gt; dafis@linux-mkk1:~&gt; c2hs -o memyself.hs memyself.chs<br>

&gt; c2hs: does not exist<br>&gt; <br>&gt; it&#39;s not that c2hs isn&#39;t found or something, c2hs doesn&#39;t find Base.chs!<br>&gt; <br>&gt; Try installing from the unpacked sources (cd portaudio; cabal install) or the old-<br>

&gt; fashioned way:<br>&gt; <br>&gt; cd portaudio-0.0.1<br>&gt; <br>&gt; ghc --make Setup<br>&gt; <br>&gt; ./Setup configure --help<br>&gt; (choose your options, prefix, profiling, ...)<br>&gt; <br>&gt; ./Setup configure $OPTIONS<br>

&gt; ./Setup build<br>&gt; <br>&gt; if all&#39;s well,<br>&gt; <br>&gt; ./Setup haddock<br>&gt; ./Setup install<br>&gt; <br>&gt;
 (dies for me with<br>&gt; dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder <br>&gt; Verzeichnisnicht gefunden<br>&gt; c2hs: Error during preprocessing custom header file<br>&gt; cabal: Error: some packages failed to install:<br>

&gt; portaudio-0.0.1 failed during the building phase. The exception was:<br>&gt; exit: ExitFailure 1<br>&gt; because I don&#39;t have portaudio installed)<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>

&gt; <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>

                                               <br><hr>Australia&#39;s #1 job site <a rel="nofollow" href="http://clk.atdmt.com/NMN/go/157639755/direct/01/" target="_blank">If It Exists, You&#39;ll Find it on SEEK</a> 
</div></blockquote></td></tr></tbody></table><br>



      <br><br>---------- Forwarded message ----------<br>From: M Xyz &lt;<a href="mailto:functionallyharmonious@yahoo.com">functionallyharmonious@yahoo.com</a>&gt;<br>To: john lask &lt;<a href="mailto:jvlask@hotmail.com">jvlask@hotmail.com</a>&gt;, <a href="mailto:vanenkj@gmail.com">vanenkj@gmail.com</a><br>

Date: Sat, 5 Dec 2009 19:47:04 -0800 (PST)<br>Subject: [Haskell-cafe] PortAudio library successfully built on Windows<br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

<br>John Lask, <br>The steps you enumerated below successfully built portaudio for me! Thank you!<br><br>I wonder though, you said to rename the dll to libpa19.dll from portaudio_x86.dll<br>and to change the .cabal entry from &quot;extra-Libraries: portaudio&quot; to &quot;extra-Libraries: pa19&quot;.<br>

Since my .dll name and .cabal file entry were mismatched, was that what could have been wrong all along? Was the creation of a .a file necessary?<br>I would delete the .a file and retry with libportaudio.dll but I won&#39;t push my luck.<br>

<br>Now if I could just get Gtk2hs working now, I could be happy *and* productive. :)<br><br>--- On <b>Sat, 12/5/09, john lask <i>&lt;<a href="mailto:jvlask@hotmail.com" target="_blank">jvlask@hotmail.com</a>&gt;</i></b> wrote:<br>

<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: john lask &lt;<a href="mailto:jvlask@hotmail.com" target="_blank">jvlask@hotmail.com</a>&gt;<br>Subject: RE: [Haskell-cafe]
 Low Level Audio - Writing bytes to the sound card?<br>To: <a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a>, <a href="mailto:functionallyharmonious@yahoo.com" target="_blank">functionallyharmonious@yahoo.com</a><br>

Cc: <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br>Date: Saturday, December 5, 2009, 9:03 PM<br><br><div>


<br><br>I don&#39;t know whether this will help you but I just downloaded an built<br>the haskell portaudio package ... (I had a windows msvc build of<br>portaudio dll already) the process I used ... ghc 6.10.4, portaudio-19<br>

<br>make an import lib for ghc from dll:<br>pexports libpa19.dll &gt; libpa19.def<br>dlltool --input-def libpa19.def --output-lib libpa19.a<br><br>edit the .cabal file or use command line flags<br><br>  extra-Libraries: pa19<br>

  extra-lib-dirs: c:\portaudio19\lib<br>  include-dirs:   c:\portaudio19\include<br><br> runghc setup configure<br><br>make sure you have cpp i.e. the c-preprocessor on your exe path,<br>otherwise you will get<br>&#39;cpp&#39; is not recognized as an internal or external command,<br>

operable program or batch file.<br>c2hs.exe: Error during preprocessing custom header file<br><br>runghc setup build<br><br>builds ok ...??<br><br><br>&gt; From: <a href="mailto:daniel.is.fischer@web.de" target="_blank">daniel.is.fischer@web.de</a><br>

&gt; To:
 <a href="mailto:functionallyharmonious@yahoo.com" target="_blank">functionallyharmonious@yahoo.com</a><br>&gt; Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>&gt; Date: Sun, 6 Dec 2009 02:34:17 +0100<br>

&gt; CC: <a href="mailto:haskell-cafe@haskell.org" target="_blank">haskell-cafe@haskell.org</a><br>&gt; <br>&gt; Am Sonntag 06 Dezember 2009 01:49:49 schrieb M Xyz:<br>&gt; <br>&gt; I just had another idea.<br>&gt; <br>&gt; dafis@linux-mkk1:~&gt; c2hs -o memyself.hs memyself.chs<br>

&gt; c2hs: does not exist<br>&gt; <br>&gt; it&#39;s not that c2hs isn&#39;t found or something, c2hs doesn&#39;t find Base.chs!<br>&gt; <br>&gt; Try installing from the unpacked sources (cd portaudio; cabal install) or the old-<br>

&gt; fashioned way:<br>&gt; <br>&gt; cd portaudio-0.0.1<br>&gt; <br>&gt; ghc --make Setup<br>&gt; <br>&gt; ./Setup configure --help<br>&gt; (choose your options, prefix, profiling, ...)<br>&gt; <br>&gt; ./Setup configure $OPTIONS<br>

&gt; ./Setup build<br>&gt; <br>&gt; if all&#39;s well,<br>&gt; <br>&gt; ./Setup haddock<br>&gt; ./Setup install<br>&gt; <br>&gt;
 (dies for me with<br>&gt; dist/build/Sound/PortAudio/Base.chs.h:1:23: error: portaudio.h: Datei oder <br>&gt; Verzeichnisnicht gefunden<br>&gt; c2hs: Error during preprocessing custom header file<br>&gt; cabal: Error: some packages failed to install:<br>

&gt; portaudio-0.0.1 failed during the building phase. The exception was:<br>&gt; exit: ExitFailure 1<br>&gt; because I don&#39;t have portaudio installed)<br>&gt; _______________________________________________<br>&gt; Haskell-Cafe mailing list<br>

&gt; <a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>

                                               <br><hr>Australia&#39;s #1 job site <a rel="nofollow" href="http://clk.atdmt.com/NMN/go/157639755/direct/01/" target="_blank">If It Exists, You&#39;ll Find it on SEEK</a> 
</div></blockquote></td></tr></tbody></table><br>

      <br><br>---------- Forwarded message ----------<br>From: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>To: Haskell Cafe &lt;<a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a>&gt;<br>

Date: Sun, 6 Dec 2009 07:04:46 +0200<br>Subject: [Haskell-cafe] When are undecidables ok?<br><div dir="ltr">I know this is basically a rewording of a previous e-mail, but I realized this is the question I *really* wanted to ask.<br>

<br>We have this language extension UndecidableInstances (not to mention OverlappingInstances), which seem to divide the Haskell camp into two factions:<br>
<br>* Hey, GHC said to turn on this flag. Ok!<br>* Undecidables are the devil!<br><br>I get the feeling the truth lies in the middle. As I understand it (please correct me if I am wrong), the problem with undecidables is that they can create non-terminating instances. However, for certain cases the programmer should be able to prove to him/herself that the instances will terminate. My question is: how can you make such a proof?<br>


<br>I&#39;ve had to cases in particular that made me want undecidables. Both of them, IMO, could be solved by creating new extensions to GHC which would not require undecidables. Nonetheless, for now we only have undecidables at our disposal. The examples are:<br>


<br>* Context synonyms (eg, MonadFailure = Monad + Failure).<br>* Subclass function defaulting<br><br>For an example of the second, a nifty definition of Monad would be:<br><br>class Applicative m =&gt; Monad m where<br>

  &gt;&gt;= ...<br>
  return ...<br>  pure = return<br>  (&lt;*&gt;) = ap<br>  fmap = liftM<br><br>Of course, neither of these is possible in Haskell, so we can use undecidables. How can a programmer prove that a set of instances is, in fact, safe? And if they make a mistake and right a bad set of undecidable/overlapping instances, what&#39;s the worst case scenario? Is it a compile-time or run-time error*?<br>


<br>Michael<br><br>* Yes, I mean error.<br></div>
<br><br>---------- Forwarded message ----------<br>From: Luke Palmer &lt;<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.com</a>&gt;<br>To: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>

Date: Sat, 5 Dec 2009 22:36:43 -0700<br>Subject: Re: [Haskell-cafe] When are undecidables ok?<br>On Sat, Dec 5, 2009 at 10:04 PM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt; wrote:<br>


&gt; I know this is basically a rewording of a previous e-mail, but I realized<br>
&gt; this is the question I *really* wanted to ask.<br>
&gt;<br>
&gt; We have this language extension UndecidableInstances (not to mention<br>
&gt; OverlappingInstances), which seem to divide the Haskell camp into two<br>
&gt; factions:<br>
&gt;<br>
&gt; * Hey, GHC said to turn on this flag. Ok!<br>
&gt; * Undecidables are the devil!<br>
&gt;<br>
&gt; I get the feeling the truth lies in the middle. As I understand it (please<br>
&gt; correct me if I am wrong), the problem with undecidables is that they can<br>
&gt; create non-terminating instances. However, for certain cases the programmer<br>
&gt; should be able to prove to him/herself that the instances will terminate. My<br>
&gt; question is: how can you make such a proof?<br>
<br>
Well, the reasoning for the &quot;devil&quot; camp (which I admit to being<br>
firmly in[1]) is that such proofs must rely on the algorithm the<br>
compiler uses to resolve instances.  You might be able to prove it,<br>
but the proof is necessarily only valid for (possibly current versions<br>
of) GHC.  The typeclass resolution algorithm is not in the report, and<br>
there are several conceivable ways of of going about it.<br>
<br>
So it is fine to use them if you are okay with making your code<br>
unportable and future-brittle. I am typically against the mere<br>
existence of code that that is future-brittle, because it encourages<br>
compiler authors not to innovate  (and by that token, unportable too,<br>
because it discourages compiler competition).<br>
<br>
Luke<br>
<br>
[1] <a href="http://lukepalmer.wordpress.com/2008/04/08/stop-using-undecidable-instances/" target="_blank">http://lukepalmer.wordpress.com/2008/04/08/stop-using-undecidable-instances/</a><br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Michael Snoyman &lt;<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>&gt;<br>To: Luke Palmer &lt;<a href="mailto:lrpalmer@gmail.com">lrpalmer@gmail.com</a>&gt;<br>

Date: Sun, 6 Dec 2009 08:20:09 +0200<br>Subject: Re: [Haskell-cafe] When are undecidables ok?<br><div dir="ltr"><br><br><div class="gmail_quote">On Sun, Dec 6, 2009 at 7:36 AM, Luke Palmer <span dir="ltr">&lt;<a href="mailto:lrpalmer@gmail.com" target="_blank">lrpalmer@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Sat, Dec 5, 2009 at 10:04 PM, Michael Snoyman &lt;<a href="mailto:michael@snoyman.com" target="_blank">michael@snoyman.com</a>&gt; wrote:<br>
&gt; I know this is basically a rewording of a previous e-mail, but I realized<br>
&gt; this is the question I *really* wanted to ask.<br>
&gt;<br>
&gt; We have this language extension UndecidableInstances (not to mention<br>
&gt; OverlappingInstances), which seem to divide the Haskell camp into two<br>
&gt; factions:<br>
&gt;<br>
&gt; * Hey, GHC said to turn on this flag. Ok!<br>
&gt; * Undecidables are the devil!<br>
&gt;<br>
&gt; I get the feeling the truth lies in the middle. As I understand it (please<br>
&gt; correct me if I am wrong), the problem with undecidables is that they can<br>
&gt; create non-terminating instances. However, for certain cases the programmer<br>
&gt; should be able to prove to him/herself that the instances will terminate. My<br>
&gt; question is: how can you make such a proof?<br>
<br>
</div>Well, the reasoning for the &quot;devil&quot; camp (which I admit to being<br>
firmly in[1]) is that such proofs must rely on the algorithm the<br>
compiler uses to resolve instances.  You might be able to prove it,<br>
but the proof is necessarily only valid for (possibly current versions<br>
of) GHC.  The typeclass resolution algorithm is not in the report, and<br>
there are several conceivable ways of of going about it.<br>
<br>
So it is fine to use them if you are okay with making your code<br>
unportable and future-brittle. I am typically against the mere<br>
existence of code that that is future-brittle, because it encourages<br>
compiler authors not to innovate  (and by that token, unportable too,<br>
because it discourages compiler competition).<br>
<br>
Luke<br>
<br>
[1] <a href="http://lukepalmer.wordpress.com/2008/04/08/stop-using-undecidable-instances/" target="_blank">http://lukepalmer.wordpress.com/2008/04/08/stop-using-undecidable-instances/</a><br></blockquote><div><br>So in that case, perhaps the compiler authors can give us some ideas as to when it&#39;s safe to use undecidables? Seems like we should go straight to the horse&#39;s mouth.<br>


<br>Michael <br></div></div><br></div>
<br><br>---------- Forwarded message ----------<br>From: &quot;Ariel J. Birnbaum&quot; &lt;<a href="mailto:valgarv@gmx.net">valgarv@gmx.net</a>&gt;<br>To: Gregory Crosswhite &lt;<a href="mailto:gcross@phys.washington.edu">gcross@phys.washington.edu</a>&gt;<br>

Date: Sun, 06 Dec 2009 08:34:16 +0200<br>Subject: Re: [Haskell-cafe] ANNOUNCE:  error-message<br>&gt; In particular, the motivation for this package was that I have written<br>
&gt; a build system, and I wanted to collect as many errors in the build as<br>
&gt; possible and show them all to the user at once.<br>
<br>
YMMV, but at least for me a deluge of errors is less helpful than a<br>
short list I can fix quickly, then try again. Often by fixing one error<br>
from the list a sizeable portion of the rest just vanish (I forget the<br>
English term for that kind of error).<br>
<br>
(In before &quot;you can use sth like quickfix to go through the first few<br>
errors and compile again whenever you feel like it&quot;.)<br>
<br>
--<br>
Ariel J. Birnbaum<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Eugene Kirpichov &lt;<a href="mailto:ekirpichov@gmail.com">ekirpichov@gmail.com</a>&gt;<br>To: Stefan Holdermans &lt;<a href="mailto:stefan@cs.uu.nl">stefan@cs.uu.nl</a>&gt;<br>

Date: Sun, 6 Dec 2009 09:42:34 +0300<br>Subject: Re: [Haskell-cafe] What is the rank of a polymorphic type?<br>2009/12/6 Stefan Holdermans &lt;<a href="mailto:stefan@cs.uu.nl">stefan@cs.uu.nl</a>&gt;:<br>
&gt; Eugene,<br>
&gt;<br>
&gt;&gt; 1) Does there exist an authoritative source saying the same? Not that<br>
&gt;&gt; I&#39;m doubting, just supposing that the source would have other<br>
&gt;&gt; interesting information, too :)<br>
&gt;<br>
&gt; You may want to have a look at the already mentioned JFP-article by Peyton<br>
&gt; Jones et al. and perhaps the work of Kfoury and Wells.<br>
&gt;<br>
&gt;&gt; 2) Is it true that rank (forall a . a, forall a . a) == 0 ?<br>
&gt;<br>
&gt; No, for pairs one takes the maximum of the constituent types. So, here you&#39;d<br>
&gt; get rank 1.<br>
&gt;<br>
&gt; Note that this is an impredicative type, which is yet another extension of<br>
&gt; the standard Hindley-Milner typing discipline.<br>
<br>
OK, thanks.<br>
However, isn&#39;t the type (forall a . a) -&gt; String impredicative because<br>
it instantiates a type variable of the type constructor (-&gt;) p q with<br>
p = forall a . a?<br>
<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt;  Stefan<br>
&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Eugene Kirpichov<br>
Web IR developer, <a href="http://market.yandex.ru" target="_blank">market.yandex.ru</a><br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Benjamin L.Russell &lt;<a href="mailto:dekudekuplex@yahoo.com">dekudekuplex@yahoo.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>

Date: Sun, 06 Dec 2009 16:14:06 +0900<br>Subject: [Haskell-cafe] Re: universal binary version of Haskell Platform?<br>On Thu, 03 Dec 2009 10:52:35 +0000, Duncan Coutts<br>
&lt;<a href="mailto:duncan.coutts@googlemail.com">duncan.coutts@googlemail.com</a>&gt; wrote:<br>
<br>
&gt;[...]<br>
&gt;<br>
&gt;There no binary platform installer for OSX PPC. You&#39;ll have to grab<br>
&gt;ghc-6.10.4 for PPC from the ghc download page and then install the<br>
&gt;platform from the generic source tarball.<br>
<br>
Ah, that&#39;s too bad.  That means that I won&#39;t be able to invoke GHC<br>
outside of the Terminal application by default, and that even if I<br>
create a Darwin shell script and alias to invoke it from Aqua, the<br>
icon for that shell script will only be generic by default.  I&#39;d<br>
rather click on an application icon in the Dock.<br>
<br>
&gt;<br>
&gt;If you&#39;d like to help us next time to make a platform binary for PPC<br>
&gt;then that&#39;d be great. I don&#39;t think we have the setup to make universal<br>
&gt;binaries but it should be possible to make a PPC build if we have a<br>
&gt;volunteer.<br>
<br>
Sure, barring job-related time constraints, I&#39;d be happy to volunteer.<br>
My Mac just went out of service because of a hardware problem with the<br>
memory, so I&#39;m order new replacement RAM this weekend.  As soon as<br>
that arrives and I install it, the problem should be resolved.<br>
<br>
What should I do?<br>
<br>
-- Benjamin L. Russell<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Dan Doel &lt;<a href="mailto:dan.doel@gmail.com">dan.doel@gmail.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>Date: Sun, 6 Dec 2009 02:48:09 -0500<br>

Subject: Re: [Haskell-cafe] What is the rank of a polymorphic type?<br>On Sunday 06 December 2009 1:42:34 am Eugene Kirpichov wrote:<br>
&gt; OK, thanks.<br>
&gt; However, isn&#39;t the type (forall a . a) -&gt; String impredicative because<br>
&gt; it instantiates a type variable of the type constructor (-&gt;) p q with<br>
&gt; p = forall a . a?<br>
<br>
There&#39;s probably no clear cut answer to this independent of how you think of<br>
(-&gt;). For instance, if we explain the Haskell type system by way of a pure<br>
type system, (-&gt;) is a special case of a pi type, which looks like:<br>
<br>
  pi x : k. t<br>
<br>
where any xs in t are bound by the pi. We then have:<br>
<br>
  p -&gt; q          = pi _ : p. q<br>
  forall a : k. b = pi a : k. b<br>
<br>
pi types are given types by sets of rules, which look like triples. If (s,t,u)<br>
is a rule, then:<br>
<br>
  G |- k : s    G, a : k |- b : t<br>
  -------------------------------<br>
      G |- (pi a : k. b) : u<br>
<br>
is the corresponding typing rule. Type systems like Haskell&#39;s are commonly<br>
thought of in terms of the lambda cube, which has constant sorts * and [],<br>
with * : []. The rule (*,*,*) gives you ordinary functions. (*,[],[]) gives<br>
you dependent types, so that&#39;s out.<br>
<br>
([],*,*) is an impredicative rule for polymorphism. This says that, for<br>
instance:<br>
<br>
  forall a. a -&gt; a = (pi a : *. pi _ : a. a) : *<br>
<br>
because (pi _ : a. a) : * if a : *, by the (*,*,*) rule, and then we apply the<br>
impredicative rule for the universal quantification. One could also use the<br>
predicative rule ([],*,[]), which would result in forall a. a -&gt; a having type<br>
[].<br>
<br>
However, Haskell also has arbitrarily higher-order types. This is given by the<br>
rule ([],[],[]), which allows expressions like:<br>
<br>
   (* -&gt; *) -&gt; * = pi _ : (pi _ : *. *). *<br>
<br>
This type system is called F_omega, while just the ([],*,?) rule is known as<br>
F_2.<br>
<br>
However, the F_omega rule also allows for arbitrary rank polymorphism even<br>
with the predicative universal quantifier rule above (predicative F_2 allows a<br>
little, but it&#39;s very limited*). For instance, the higher rank type:<br>
<br>
  forall a. (forall b. b) -&gt; a<br>
<br>
checks thusly:<br>
<br>
  (forall b. b)                  : [] via ([],*,[])<br>
  ((forall b. b) -&gt; a)           : [] via ([],*,[])<br>
  (forall a. (forall b. b) -&gt; a) : [] via ([],[],[])<br>
<br>
Data types, by contrast, have kinds like * -&gt; *, so using say,<br>
<br>
  Maybe (forall a. a -&gt; a)<br>
<br>
genuinely relies on the impredicative rule. GHC&#39;s type system isn&#39;t exactly<br>
set up in this way, but (-&gt;) is similarly special in that it somehow isn&#39;t<br>
quite just another type constructor with kind * -&gt; * -&gt; * (or even whatever<br>
special kinds GHC uses to support unboxed values and such).<br>
<br>
Hope that wasn&#39;t too confusing. :)<br>
<br>
-- Dan<br>
<br>
* Predicative F_2 will essentially allow one universal quantifier somewhere in<br>
the type. This can be:<br>
<br>
  forall a. a -&gt; a<br>
<br>
or it can be:<br>
<br>
  (((forall a. a) -&gt; T) -&gt; U) -&gt; V<br>
<br>
for T, U and V of kind * (the only kind in F_2), which is a rank-4 type. It<br>
doesn&#39;t allow:<br>
<br>
  forall a b. a -&gt; b<br>
<br>
even, because the inner (forall b. a -&gt; b) : [], so adding the forall a<br>
requires the F_omega rule.<br>
<br>
Predicative F_2 and F_w also blow up with quantification on the right of an<br>
arrow, because it looks like the rule for dependent types:<br>
<br>
  T -&gt; (forall a. a)<br>
<br>
  T : *, (forall a. a) : []<br>
<br>
so the rule (*,[],[]) would be invoked.<br>
<br>
GHC doesn&#39;t have this sort of hierarchy, and so doesn&#39;t have these sorts of<br>
weird cases, despite being predicative of a sort. Instead it distinguishes<br>
somehow between monotypes ([Float], String -&gt; Int, a -&gt; b) and polytypes<br>
(forall a. a, ...), although it doesn&#39;t really display the difference.<br>
Quantifiers are only supposed to range over kinds that classify monotypes (or<br>
monotype constructors), which keeps the predicativity (although, even this<br>
gets fudged some: If I have forall a. a -&gt; a, I can instantiate a to the<br>
polytype forall a. a -&gt; a with rank-n polymorphism, because it only seems to<br>
worry about the validity of the resulting type, and (-&gt;) is special; by<br>
contrast, the same cannot be said for forall a. Maybe a, because Maybe<br>
genuinely only accepts monotypes without -XImpredicativeTypes).<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Bulat Ziganshin &lt;<a href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>&gt;<br>To: Andrew Coppin &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt;<br>

Date: Sun, 6 Dec 2009 11:13:21 +0300<br>Subject: Re[2]: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>Hello Andrew,<br>
<br>
Sunday, December 6, 2009, 1:09:18 AM, you wrote:<br>
<br>
&gt; Maybe once I get hired by some financial modelling consultants and get<br>
&gt; paid shedloads of money to write Haskell all day, I&#39;ll be able to afford<br>
&gt; a Mac. But until then...<br>
<br>
with such attitude you will never be hired by financial sector. try instead:<br>
<br>
mac? great! windows? i love it! unix? i&#39;ve used it since 60&#39;s<br>
<br>
<br>
--<br>
Best regards,<br>
 Bulat                            mailto:<a href="mailto:Bulat.Ziganshin@gmail.com">Bulat.Ziganshin@gmail.com</a><br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Heinrich Apfelmus &lt;<a href="mailto:apfelmus@quantentunnel.de">apfelmus@quantentunnel.de</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>

Date: Sun, 06 Dec 2009 11:28:25 +0100<br>Subject: [Haskell-cafe] Re: universal binary version of Haskell Platform?<br>Benjamin L.Russell wrote:<br>
&gt; Ah, that&#39;s too bad.  That means that I won&#39;t be able to invoke GHC<br>
&gt; outside of the Terminal application by default, and that even if I<br>
&gt; create a Darwin shell script and alias to invoke it from Aqua, the<br>
&gt; icon for that shell script will only be generic by default.  I&#39;d<br>
&gt; rather click on an application icon in the Dock.<br>
<br>
You can write an applescript similar to<br>
<br>
    Open Terminal Here<br>
    from <a href="http://www.entropy.ch/software/applescript/" target="_blank">http://www.entropy.ch/software/applescript/</a><br>
<br>
and endow it with a custom icon.<br>
<br>
<br>
Regards,<br>
Heinrich Apfelmus<br>
<br>
--<br>
<a href="http://apfelmus.nfshost.com" target="_blank">http://apfelmus.nfshost.com</a><br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Andrew Coppin &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>

Date: Sun, 06 Dec 2009 13:05:19 +0000<br>Subject: Re: [Haskell-cafe] Low Level Audio - Writing bytes to the sound card?<br>Bulat Ziganshin wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Andrew,<br>
<br>
Sunday, December 6, 2009, 1:09:18 AM, you wrote:<br>
<br>
  <br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Maybe once I get hired by some financial modelling consultants and get<br>
paid shedloads of money to write Haskell all day, I&#39;ll be able to afford<br>
a Mac. But until then...<br>
    <br>
</blockquote>
<br>
with such attitude you will never be hired by financial sector. try instead:<br>
<br>
mac? great! windows? i love it! unix? i&#39;ve used it since 60&#39;s<br>
  <br>
</blockquote>
<br>
That&#39;s OK. I&#39;m reasonably sure I will never get hired by the financial sector /anyway/. :-(<br>
<br>
<br>
<br><br>---------- Forwarded message ----------<br>From: Andrew Coppin &lt;<a href="mailto:andrewcoppin@btinternet.com">andrewcoppin@btinternet.com</a>&gt;<br>To: <a href="mailto:haskell-cafe@haskell.org">haskell-cafe@haskell.org</a><br>

Date: Sun, 06 Dec 2009 13:18:59 +0000<br>Subject: Re: [Haskell-cafe] binding to C libraries on Windows was Low Level Audio - Writing bytes to the sound card?<br>john lask wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think there are some misapprehensions here:-<br>
<br>
Many haskell packages binding to c libraries will compile with ghc<br>
without problems on windows - without cygwin, without mingw/msys system.<br>
</blockquote>
<br>
OK, well I haven&#39;t tried building every C binding on all of Hackage, just a few of them. So far none of them have worked. (Including wxHaskell, SDL, one of the database packages, etc.) It&#39;s got to the point where I&#39;ve simply given up trying. Most such packages just don&#39;t seem to work on Windows, and nobody on the mailing lists or on IRC has any clue why. (I guess because few people in the Haskell community use Windows and understand how it&#39;s supposed to work.)<br>


<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Some such packages build &quot;out of the box&quot; on windows, like the zlib<br>
package which contains the c source for the c zlib library. GHC is able<br>
to compile and build this packages without any other c<br>
compiler/libraries/unix emulators etc because ghc itself contains part<br>
of the gcc c compiler tool chain and comes with all c standard headers,<br>
c++ headers and c/c++ runtime libraries.<br>
</blockquote>
<br>
Yes, I realised long ago that GHC uses GCC and other GNU build tools. (Presumably this makes porting to Windows far easier.) More recently I realised that it also includes a surprisingly large set of header files, seemingly including the entire Win32 API, which is interesting.<br>


<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
There<br>
is only one gotch-ya - you need to have a import library for the gcc<br>
tool chain (thats what ghc uses) i.e. a &quot;.a&quot; library and not the native<br>
windows &quot;.LIB&quot; import library.<br>
</blockquote>
<br>
They&#39;re different?? o_O<br>
<br>
Oh. Suddenly several things seem clearer...<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If you don&#39;t have &quot;.a&quot; import library<br>
but have the dll then the &#39;.a&#39; import library be built for any dll<br>
relativley easily.<br>
</blockquote>
<br>
Any idea how?<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
the bigest problem hamperring cleaner builds of haskell packages on<br>
windows is the lack of any standardised scheme for the installation of<br>
c-libraries and header files (and of course the availability of a<br>
suitable build of the library).<br>
</blockquote>
<br>
Isn&#39;t one of Cabal&#39;s jobs to figure out where stuff is? Can&#39;t we get Cabal on Windows to say &quot;hey, I need to find foo.h, you know where that is?&quot; Or something like that?<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Another problem hampering the install of haskell packages on windows is<br>
the use of the unix autoconf build system (./configure)   - package<br>
writters note!<br>
</blockquote>
<br>
Heh. I found one Wiki page once describing how to set up a Cabal package. When it started talking about how to integrate Automake, I hung my head is dispair. (I believe the page in question is fixed now. But a lot of package authors seem to assume that everybody just uses Unix of some kind...)<br>


<br>
<br>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>