Your analysis is basically correct. These syntactic features do not play nicely with pointfree style. But I can go into a bit more detail.<div><br></div><div>It isn&#39;t surprising that do-notation prevents point-free style. The purpose of do-notation is to provide a nicer way to bind variables in monadic code. The goal of pointfree style is to get rid of unneeded variable bindings. In fact, if you have a function written with do-notation that can be translated into pointfree style, then you don&#39;t need do-notation. For example, beginners will often write code like this:</div>
<div><br></div><div>do { x &lt;- m ; f x }</div><div><br></div><div>When they could write the much simpler:</div><div><br></div><div>m &gt;&gt;= f</div><div><br></div><div>Record notation is a different situation. The notation itself is very pointy, but the notation is optional. Using lenses to access and update your records might be a good way to integrate them into pointfree code.</div>
<div><br></div><div>-Karl</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Nov 24, 2012 at 2:13 AM, Christopher Howard <span dir="ltr">&lt;<a href="mailto:christopher.howard@frigidcode.com" target="_blank">christopher.howard@frigidcode.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After reading the Haskell wiki article about pointfree style I naturally<br>
started playing around with with converting my regular code to<br>
pointfree. However, I immediately got stuck on the specific cases of 1)<br>
do syntax and 2) record syntax. For example:<br>
<br>
code:<br>
--------<br>
playMusic rt =<br>
  do [source] &lt;- genObjectNames 1<br>
     buffer source $= getSound rt &quot;music.wav&quot;<br>
     sourceGain source $= 0.4<br>
     loopingMode source $= Looping<br>
     play [source]<br>
--------<br>
<br>
And another (contrived) example:<br>
<br>
code:<br>
--------<br>
data A = A { u :: Int<br>
           , v :: Double<br>
           , w :: String<br>
           , ...<br>
           }<br>
<br>
f a b = a { v = b }<br>
--------<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
<a href="http://frigidcode.com" target="_blank">frigidcode.com</a><br>
<br>
</font></span><br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>