<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sirocco</author_name>
  <author_url>https://blog.hatena.ne.jp/sirocco/</author_url>
  <blog_title>sirocco の書いてもすぐに忘れるメモ</blog_title>
  <blog_url>https://sirocco.hatenadiary.org/</blog_url>
  <categories>
    <anon>Haskell</anon>
  </categories>
  <description>やさしい Haskell 入門 (バージョン 98 ) 6 再び、型について 6.1 Newtype 宣言 を参考に newtype を作ってみます。 newtype Age = Age Integer deriving (Eq, Read, Show) toAge :: Integer -&gt; Age toAge x | x &lt; 0 = error &quot;Can't create negative age!&quot; | otherwise = Age x fromAge :: Age -&gt; Integer fromAge (Age i) = i instance Num Age where fromIn…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsirocco.hatenadiary.org%2Fentry%2F20100722%2F1279830753&quot; title=&quot;newtype を作ってみる - sirocco の書いてもすぐに忘れるメモ&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>2010-07-22 05:32:33</published>
  <title>newtype を作ってみる</title>
  <type>rich</type>
  <url>https://sirocco.hatenadiary.org/entry/20100722/1279830753</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
