<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.kerneis.info/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Mur blanc - Tag - OCamlduce</title>
  <link>http://blog.kerneis.info/</link>
  <atom:link href="http://blog.kerneis.info/feed/tag/OCamlduce/rss2" rel="self" type="application/rss+xml"/>
  <description>Notes quotidiennes sur sujets variés, et bribes de connaissance sur tout ce qui me paraît digne d'intérêt. En bref, un fourre-tout qui se targue d'être intéressant. Tout un programme...</description>
  <language>fr</language>
  <pubDate>Wed, 12 Nov 2008 18:46:29 +0100</pubDate>
  <copyright>Licence CC by-nc-sa 2.0 (version française), sauf mention contraire.</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Instant de lumière</title>
    <link>http://blog.kerneis.info/post/2006/12/29/Instant-de-lumiere</link>
    <guid isPermaLink="false">urn:md5:eac3361ab436622740ed55dcbd74e8ba</guid>
    <pubDate>Fri, 29 Dec 2006 12:24:00 +0100</pubDate>
    <dc:creator>Gabriel Kerneis</dc:creator>
        <category>Inclassables</category>
        <category>geek</category><category>OCamlduce</category>    
    <description>    &lt;p&gt;Je viens de franchir un cap. J'ai compris la translation de type dans
OCamlduce. C'était pourtant pas dur. Suffisait de lire la doc. Comme d'hab
quoi.&lt;/p&gt;
&lt;p&gt;Bon, pour les gens &lt;em&gt;déraisonnablement&lt;/em&gt; curieux, le point crucial est
le suivant (extrait du &lt;a href=&quot;http://www.cduce.org/ocaml_manual.html&quot; hreflang=&quot;en&quot;&gt;manuel d'OCamlduce&lt;/a&gt;) :&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;# let f (x : {{ Int }}) = {{ x + 1 }} in List.map f &lt;strong&gt;{:&lt;/strong&gt;
[ 1 2 3 ] &lt;strong&gt;:}&lt;/strong&gt;;;&lt;br /&gt;
- : {{Int}} list = [{{2}}; {{3}}; {{4}}]&lt;/p&gt;
&lt;p&gt;In this example, the result type of the translation is inferred to be {{ Int
}} list (&lt;strong&gt;because the type for f is given&lt;/strong&gt;). The corresponding
x-type is {{ [Int*] }}.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Donc je résume : d'une part, utiliser la bonne syntaxe (forcément, {{
... }} au lieu de {: ... :} ça ne fonctionne pas) ; d'autre part, indiquer
explicitement le type de la fonction appliquée pour que l'inférence de types ne
se prenne pas les pieds dans le tapis.&lt;/p&gt;
&lt;p&gt;Bon, bah on va pouvoir commencer à coder...&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.kerneis.info/post/2006/12/29/Instant-de-lumiere#comment-form</comments>
      <wfw:comment>http://blog.kerneis.info/post/2006/12/29/Instant-de-lumiere#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.kerneis.info/feed/rss2/comments/66244</wfw:commentRss>
      </item>
    
</channel>
</rss>