<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Simplifying semantics with type class morphisms</title>
	<atom:link href="http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms</link>
	<description>Inspirations &#38; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Sat, 26 Sep 2020 21:06:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.17</generator>
	<item>
		<title>By: James Deikun</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-106</link>
		<dc:creator><![CDATA[James Deikun]]></dc:creator>
		<pubDate>Fri, 20 Aug 2010 00:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-106</guid>
		<description><![CDATA[&lt;p&gt;No; I&#039;m not talking about regular lists that happen to be ordered, but about values belonging to a type of list that can only be ordered, not disordered.  You can express ADTs that act like this in Haskell, but the natural and beautiful expression of the type requires dependent types, probably to a greater degree than Haskell can fake.&lt;/p&gt;

&lt;p&gt;Pseudocode:&lt;/p&gt;

&lt;pre&gt;
data (Ord a) =&gt; BoundedOrderedList a b :: * -&gt; a -&gt; * where
  BOCons hd w tl :: a -&gt; (hd &gt;= b) -&gt; BoundedOrderedList a hd -&gt; BoundedOrderedList a b
  BONil :: BoundedOrderedList a b

type (Ord a) =&gt; OrderedList a = exists b :: a. BoundedOrderedList a b
&lt;/pre&gt;

&lt;p&gt;OrderedList is a monoid with merge as mappend.  And (at least in its proof-irrelevant refinement form) it&#039;s obviously the type you actually want to be using to define the denotation of events.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>No; I&#8217;m not talking about regular lists that happen to be ordered, but about values belonging to a type of list that can only be ordered, not disordered.  You can express ADTs that act like this in Haskell, but the natural and beautiful expression of the type requires dependent types, probably to a greater degree than Haskell can fake.</p>

<p>Pseudocode:</p>

<pre>
data (Ord a) =&gt; BoundedOrderedList a b :: * -&gt; a -&gt; * where
  BOCons hd w tl :: a -&gt; (hd &gt;= b) -&gt; BoundedOrderedList a hd -&gt; BoundedOrderedList a b
  BONil :: BoundedOrderedList a b

type (Ord a) =&gt; OrderedList a = exists b :: a. BoundedOrderedList a b
</pre>

<p>OrderedList is a monoid with merge as mappend.  And (at least in its proof-irrelevant refinement form) it&#8217;s obviously the type you actually want to be using to define the denotation of events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-105</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Wed, 18 Aug 2010 05:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-105</guid>
		<description><![CDATA[&lt;p&gt;James: only if all the occurrences in the first event precede all the occurrences in the second, right?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>James: only if all the occurrences in the first event precede all the occurrences in the second, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Deikun</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-104</link>
		<dc:creator><![CDATA[James Deikun]]></dc:creator>
		<pubDate>Tue, 17 Aug 2010 03:07:43 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-104</guid>
		<description><![CDATA[&lt;p&gt;This works better than you thought:&lt;/p&gt;

&lt;p&gt;merge isn&#039;t mappend on lists ... but it &lt;em&gt;is&lt;/em&gt; mappend on &lt;em&gt;ordered lists&lt;/em&gt;!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>This works better than you thought:</p>

<p>merge isn&#8217;t mappend on lists &#8230; but it <em>is</em> mappend on <em>ordered lists</em>!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Simpler, more efficient, functional linear maps</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-103</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Simpler, more efficient, functional linear maps]]></dc:creator>
		<pubDate>Sat, 24 Jan 2009 06:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-103</guid>
		<description><![CDATA[&lt;p&gt;[...] other words, the meaning of a liftA2 is the liftA2 of the meanings, as discussed in Simplifying semantics with type class morphisms.    Tags: linear map, math, memoization, trie, type family  &#160;&#124;&#160;&#160;Comment (RSS) [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] other words, the meaning of a liftA2 is the liftA2 of the meanings, as discussed in Simplifying semantics with type class morphisms.    Tags: linear map, math, memoization, trie, type family  &nbsp;|&nbsp;&nbsp;Comment (RSS) [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sclv</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-102</link>
		<dc:creator><![CDATA[sclv]]></dc:creator>
		<pubDate>Tue, 06 Jan 2009 04:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-102</guid>
		<description><![CDATA[&lt;p&gt;OK this is probably blindingly obvious but it just hit me that there&#039;s obviously some sort of deep connection between type class morphisms and free theorems -- whether this can tell us more about free theorems, or whether this means that we can use free theorems to derive type class morphisms, or whether this is just a trivial statement that they both involve reasoning with types isn&#039;t quite clear to me yet.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>OK this is probably blindingly obvious but it just hit me that there&#8217;s obviously some sort of deep connection between type class morphisms and free theorems &#8212; whether this can tell us more about free theorems, or whether this means that we can use free theorems to derive type class morphisms, or whether this is just a trivial statement that they both involve reasoning with types isn&#8217;t quite clear to me yet.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Sequences, segments, and signals</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-101</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Sequences, segments, and signals]]></dc:creator>
		<pubDate>Sat, 06 Dec 2008 16:27:17 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-101</guid>
		<description><![CDATA[&lt;p&gt;[...] have to agree with the model&#8217;s instances. I&#8217;ve described this latter principle in Simplifying semantics with type class morphisms and some other [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] have to agree with the model&#8217;s instances. I&#8217;ve described this latter principle in Simplifying semantics with type class morphisms and some other [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Composing memo tries</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-100</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Composing memo tries]]></dc:creator>
		<pubDate>Tue, 02 Dec 2008 18:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-100</guid>
		<description><![CDATA[&lt;p&gt;[...] The post Elegant memoization with functional memo tries showed a simple type of search tries and their use for functional memoization of functions. This post provides some composition tools for memo tries, whose definitions are inevitable, in that they are determined by the principle presented in Simplifying semantics with type class morphisms. [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] The post Elegant memoization with functional memo tries showed a simple type of search tries and their use for functional memoization of functions. This post provides some composition tools for memo tries, whose definitions are inevitable, in that they are determined by the principle presented in Simplifying semantics with type class morphisms. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Enhancing a Zip</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-99</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Enhancing a Zip]]></dc:creator>
		<pubDate>Sun, 16 Nov 2008 01:11:02 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-99</guid>
		<description><![CDATA[&lt;p&gt;[...] Simplifying semantics with type class morphisms  [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] Simplifying semantics with type class morphisms  [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Proofs for left fold zipping</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-98</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Proofs for left fold zipping]]></dc:creator>
		<pubDate>Sat, 15 Nov 2008 21:30:36 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-98</guid>
		<description><![CDATA[&lt;p&gt;[...] morphism? (See More beautiful fold zipping for definitions of these functions and classes, and see Simplifying semantics with type class morphisms for the notion of type class [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] morphism? (See More beautiful fold zipping for definitions of these functions and classes, and see Simplifying semantics with type class morphisms for the notion of type class [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; More beautiful fold zipping</title>
		<link>http://conal.net/blog/posts/simplifying-semantics-with-type-class-morphisms#comment-97</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; More beautiful fold zipping]]></dc:creator>
		<pubDate>Sat, 15 Nov 2008 07:24:27 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=23#comment-97</guid>
		<description><![CDATA[&lt;p&gt;[...] class morphisms, placed some standard structure around Max Rabkin&#8217;s Beautiful folding, using type class morphisms to confirm that the Functor and Applicative instances agreed with their inevitable [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] class morphisms, placed some standard structure around Max Rabkin&#8217;s Beautiful folding, using type class morphisms to confirm that the Functor and Applicative instances agreed with their inevitable [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
