<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mkotha</author_name>
  <author_url>https://blog.hatena.ne.jp/mkotha/</author_url>
  <blog_title>www.kotha.netの裏</blog_title>
  <blog_url>https://mkotha.hatenadiary.org/</blog_url>
  <categories>
    <anon>haskell</anon>
  </categories>
  <description>これはHaskell Advent Calendar 2013の(3+π)日目の記事です。(3 + pi)や(quot 7 8)のような単純な定数式は、ghc -Oが行なう定数畳み込みによってコンパイル時に計算される。uncurry (*) (3, max 5 2)のようなやや複雑な式も、インライン展開してから定数畳み込みをすることでやはりコンパイル時に整数リテラルにまで簡約される。これは一見万能だが、再帰的な関数が一つでもあると何もできなくなる。GHCが再帰関数をインライン化しないからだ。(sum [1])ですら実行時のループにコンパイルされる*1。どうしてもコンパイル時に計算してほしい関数…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmkotha.hatenadiary.org%2Fentry%2F20131206%2F1386330227&quot; title=&quot; RULESによるコンパイル時プログラミング - www.kotha.netの裏&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2013-12-06 20:43:47</published>
  <title> RULESによるコンパイル時プログラミング</title>
  <type>rich</type>
  <url>https://mkotha.hatenadiary.org/entry/20131206/1386330227</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
