TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Programming at the specification level with Haskell

43 pointsby agocoronaabout 10 years ago

6 comments

michaelochurchabout 10 years ago
OP: a question about some of your earlier work. In particular, I&#x27;m reading through your &quot;A Monad For Reactive Programming, Part 1&quot;. <a href="https://www.fpcomplete.com/user/agocorona/a-monad-for-reactive-programming-part-1" rel="nofollow">https:&#x2F;&#x2F;www.fpcomplete.com&#x2F;user&#x2F;agocorona&#x2F;a-monad-for-reacti...</a><p>I see a lot of higher-rank types, like this:<p><pre><code> data Event = forall a. Event EvType a </code></pre> as opposed to:<p><pre><code> data Event a = Event EvType a </code></pre> These mean different things. In the former, an Event has to be able to hold <i>any</i> a, and that doesn&#x27;t really make sense (unless I&#x27;m misinterpreting something) because the only value that inhabits <i>all</i> types a is undefined&#x2F;bottom.<p>Or is that what you want? Is there a reason why you use higher-rank types (which make my brain hurt, require a lot of language extensions, etc.) rather than parameterized types? If so, could you spell that out?<p>Another example is this:<p><pre><code> data EventF = forall m b c. EventF (b → Transient m c) </code></pre> Again, I&#x27;m not really familiar with what you&#x27;re doing so it&#x27;s quite possible that using higher-rank types is exactly what you want (see: ST Monad and Lenses, where rank-2 types are crucial). I&#x27;m just having a hard time seeing it.<p>Thanks!
评论 #9108368 未加载
mijoharasabout 10 years ago
Does anyone else get &quot;Base.hs@493:1-493:2 parse error on input `&quot; on trying to run the code snippet in <a href="https://www.fpcomplete.com/user/agocorona/EDSL-for-hard-working-IT-programmers#composition-of-programs--runnable-example-" rel="nofollow">https:&#x2F;&#x2F;www.fpcomplete.com&#x2F;user&#x2F;agocorona&#x2F;EDSL-for-hard-work...</a><p>Am I misusing fpcomplete, or does the code snippet not work?
评论 #9106727 未加载
评论 #9106777 未加载
评论 #9106706 未加载
评论 #9106840 未加载
unfamiliarabout 10 years ago
&quot;Object-oriented programming is an exceptionally bad idea which could only have originated in California.&quot; - Dijkstra<p>I don&#x27;t think this is a real quotation.
评论 #9106538 未加载
评论 #9106247 未加载
noelwelshabout 10 years ago
This article assumes too much background -- not of Haskell but of the authors prior work. It starts off: &quot;I have a problem: How I present the few applicative and monadic combinators that I just developed.&quot;<p>Ummm ... which combinators? At least provide a link to the prior article that I assume introduced them. As introductions go, this article&#x27;s introduction doesn&#x27;t do a very good job.
评论 #9106878 未加载
评论 #9106875 未加载
agocoronaabout 10 years ago
Very sorry: <a href="https://www.fpcomplete.com/user/agocorona/EDSL-for-hard-working-IT-programmers" rel="nofollow">https:&#x2F;&#x2F;www.fpcomplete.com&#x2F;user&#x2F;agocorona&#x2F;EDSL-for-hard-work...</a>
评论 #9106420 未加载
评论 #9107323 未加载
tomeabout 10 years ago
This seems to be a valid link:<p><a href="https://www.fpcomplete.com/user/agocorona/EDSL-for-hard-working-IT-programmers" rel="nofollow">https:&#x2F;&#x2F;www.fpcomplete.com&#x2F;user&#x2F;agocorona&#x2F;EDSL-for-hard-work...</a>