<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zknx</author_name>
  <author_url>https://blog.hatena.ne.jp/zknx/</author_url>
  <blog_title>zknxの日記</blog_title>
  <blog_url>https://zknx.hatenadiary.org/</blog_url>
  <categories>
    <anon>Haskell</anon>
  </categories>
  <description>hGetContents に渡したハンドラを hClose すると、hGetContents の結果が空文字列になる。 import IO (openFile, IOMode(ReadMode), hGetContents, hClose, bracket) f1 = do h &lt;- openFile &quot;hoge.txt&quot; ReadMode s &lt;- hGetContents h return s f2 = bracket (openFile &quot;hoge.txt&quot; ReadMode) (hClose) (hGetContents) main = do run &quot;f1&quot; f1 run &quot;f2&quot; …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzknx.hatenadiary.org%2Fentry%2F20090626%2F1245978078&quot; title=&quot;hGetContents と hClose - zknxの日記&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>2009-06-26 10:01:18</published>
  <title>hGetContents と hClose</title>
  <type>rich</type>
  <url>https://zknx.hatenadiary.org/entry/20090626/1245978078</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
