Jeff Wheeler wrote:
On Dec 16, 2008, at 10:08 PM, Ryan Grant wrote:
nice.
the first is better.
in the second, i don't even see the lambda.
Thanks the feedback. I just uploaded a new version [1] that is
icon-sized, although the font used is Helvetica Neue, which is non-free.
I have no free
quoth Andrew Coppin:
quoth Tristan Seligmann:
quoth Andrew Coppin:
Sure, there are many concepts in Haskell which just aren't found
anywhere else. But monads? Catamorphisms? Coroutines? Couldn't we
think up some less intimidating terminology?
The problem is that less
Luke Palmer wrote:
This does not answer your question, but you can solve this problem without
rewrite rules by having length return a lazy natural:
data Nat = Zero | Succ Nat
And defining lazy comparison operators on it.
And if you want to go that route, then see
In a similar vein, is there already a function available to give the
size of Word in bytes? Or should I write the usual Ptr conversion tricks
to figure it out?
Holger Siegel wrote:
On Thursday 18 December 2008 13:40:47 Ryan Ingram wrote:
Actually, this is probably safer:
import
-- Announcing: bytestring-trie 0.1.0 (beta)
An efficient finite map from (byte)strings to values.
The implementation is based on big-endian patricia trees, like
Data.IntMap. We first trie on the Word8
Maurício wrote:
But why would you want that? I understand the only
situation when talking about number of bytes
makes sense is when you are using Foreign and
Ptr. Besides that, you can only guess the amount
of memory you need to deal with your data (taking
laziness, GC etc. into account).
Maurício wrote:
But why would you want that? I understand the only
situation when talking about number of bytes
makes sense is when you are using Foreign and
Ptr. (...)
Because I'm using both Ptr and Foreign? ;)
See my recent announcement for bytestring-trie. One of the
Maurício wrote:
Hi,
Why isn't the last line of this code allowed?
f :: (TestClass a) = a - Integer
f = const 1
a = (f,f)
g = fst a
Just to make explicit what other folks have brought up in passing. The
real type of @f@ (that is without syntactic sugar) is:
f :: forall a. TestClass a
Brian Hurt wrote:
So, style question for people, if I can. I have a certain problem-
basically, I have a bunch of functions which need a special function,
of type a - Foo say. And a bunch of other functions which can define
that function on some type of interest, and then what to call the
Jeff Heard wrote:
Updated Control.Monad.IfElse to include Wren Thornton's
Control.Monad.Extras, unlessM, ncond (unless-else chaining), ncondM,
and more binary conditional operators.
Hackage's Haddock seems to have eaten the documentation for the new
functions (though some should have less
Aai wrote:
Hi Bulat,
That I (can) understand, but of course the main question is: is point
free in (some/several/all) cases faster than the more readable lambda
construction? That's to say when executed in GHCi. I noticed this
behavior before (pity I haven't other examples at hand). In prog.
Thomas DuBuisson wrote:
Jeff Heard proclaimed:
There are multiple distinct reasons people use Show, and this gets
confusing.
This is exactly what I was getting at. I see four uses being discussed:
Indeed, though I think the situation is even worse. It seems to me that
there are a number
Hans van Thiel wrote:
However, there is a mechanism (sometimes) to compose functions using an
extra type m a, m b, m c etc. instead of types a, b, c... This does not
solve the problem concerning side effects, but it does provide a sort of
'Chinese boxes' to contain them within these type
Henning Thielemann wrote:
I think, that a user who uses GHCi becomes a developer. For me a user is
someone who calls compiled Haskell programs.
GHCi makes for a great calculator.
I agree that, to a first approximation, users call compiled binaries
and developers use GHCi. But there's a big
-- bytestring-trie 0.1.1 (bugfix)
An efficient finite map from (byte)strings to values.
The implementation is based on big-endian patricia trees, like
Data.IntMap. We first trie on the Word8 elements of a
Original Message
Message-ID: 496176cf.3090...@freegeek.org
Date: Sun, 04 Jan 2009 21:56:15 -0500
From: wren ng thornton w...@freegeek.org
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
MIME-Version: 1.0
To: ChrisK hask...@list.mightyreason.com
Subject: Re: ANN
-- bytestring-trie 0.1.2 (bugfix)
Another bugfix release for efficient finite maps from (byte)strings to
values. Release early, release often.
-- Changes
Dear Cafe,
Every now and then I find myself in the position where I'd like to
define some hairy value as a CAF instead of a literal, but I'd like for
it to be fully evaluated at compile-time rather than postponed until
runtime. It'd be possible to bludgeon the CPP into doing this, but it
Tim Newsham wrote:
I know the short-term answer is use TH to derive folds if
I want them, but I think such an important concept should probably
be part of the language.
If you don't mind the hairy code, there's always this generic answer
from #haskell almost a year ago:
Andrea Vezzosi wrote:
On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton w...@freegeek.org wrote:
The question for y'all is what should I call it? I've been calling the
template-function qaf (for Compiled Applicative Form ;) and the type class with
that function would be the only thing
Henning Thielemann wrote:
wren ng thornton schrieb:
Every now and then I find myself in the position where I'd like to
define some hairy value as a CAF instead of a literal, but I'd like for
it to be fully evaluated at compile-time rather than postponed until
runtime. It'd be possible
wren ng thornton wrote:
Andrea Vezzosi wrote:
On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton w...@freegeek.org
wrote:
The question for y'all is what should I call it? I've been calling
the template-function qaf (for Compiled Applicative Form ;) and the
type class with that function would
-- bytestring-trie 0.1.4
Another release for efficient finite maps from (byte)strings to values.
Equal parts bugfix release and real release. This upgrade is suggested
for all users and is what 0.1.0
Don Stewart wrote:
Do you have any benchmarks comparing dictionaries against Map ByteString
Int, or Map String Int?
I haven't personally run them, but Mark Wotton has compared
[(ByteString,Int)] vs (Map ByteString Int) vs (Trie Int) version 0.1.1
or 0.1.2 and using data from
Anton van Straaten wrote:
Derek Elkins wrote:
* A related annoyance is people who talk about languages supporting
currying and/or partial application. Unless one means that the
language supports higher order functions at all by that, it doesn't make
any sense. Haskell has no support for
Duncan Coutts wrote:
It may well be tempting to plague maintainers until they fix their
packages however in practise it will not work. We want a low barrier to
entry for packages on hackage and we do not want to annoy package
maintainers to the point where they decide to stop using hackage at
Ketil Malde wrote:
Sjoerd Visscher sjo...@w3future.com writes:
JSON is a UNICODE format, like any modern format is today. ByteStrings
are not going to work.
Well, neither is String as used in the code I responded to. I'm not
intimately familiar with JSON, but I believe ByteStrings would
John Lato wrote:
Here is the current complete documentation for Data.Monoid 'mappend',
which happens to be a good example of which I speak:
An associative operation
That could mean anything. There are lots of associative operations.
Yes. In combination with the definition of mempty (the
Luke Palmer wrote:
On Mon, Jan 19, 2009 at 3:58 AM, Patai Gergely patai_gerg...@fastmail.fmwrote:
However, there are other type classes that are too general to assign
such concrete uses to. For instance, if a data structure can have more
than one meaningful (and useful) Functor or Monoid
Patai Gergely wrote:
Hi everyone,
I have a general program design question, but I can't really think of
good examples so it will be a bit vague. There was a discussion on Show
not long ago which brought up the problem that there are several ways to
show a data structure, and it depends on the
Jim Burton wrote:
Hi, I will be a TA on a comparative PL course and I'm looking for
small examples (ammunition) which motivate the use of Haskell and
functional programming generally. The course is for 1st year Software
Engineers, none of whom are likely to have used a functional
language. They
Andrew Wagner wrote:
Strange little bit of code:
http://moonpatio.com:8080/fastcgi/hpaste.fcgi/view?id=829#a829
If I do any of the following, all of which seem natural to me, it fails to
typecheck:
1. move f out of the 'where' clause (with or without a type signature)
2. put the same
John Goerzen wrote:
Magnus Therning wrote:
John Goerzen wrote:
It's hard to remember all the functions to use to do these. I often
resort to a chart I made for numeric conversions.
Not the type of response you want, but would you publish that chart
somewhere, please ;-)
Sure :-)
On Saturday 24 January 2009 11:39:13 am Andrew Wagner wrote:
This is almost a fold, but seemingly not quite? I know I've seem some
talk
of folds that potentially quit early. but not sure where I saw that,
or
if it fits.
Were thinking of Elgot algebras
John Goerzen wrote:
Hi folks,
I have uploaded a new package to Haskell: convertible. At its heart,
it's a very simple typeclass that's designed to enable a reasonable
default conversion between two different types without having to
remember a bunch of functions.
I once again point out that
Bryan O'Sullivan wrote:
On Tue, Jan 27, 2009 at 1:18 PM, Duncan Coutts
duncan.cou...@worc.ox.ac.ukwrote:
Not since then, no. However a lot of things work fine, especially if you
use a newer Cabal version.
I've been unable to figure out how to build Cabal with Hugs 2006.09.04:
$ *runhugs
wren ng thornton wrote:
Bryan O'Sullivan wrote:
On Tue, Jan 27, 2009 at 1:18 PM, Duncan Coutts
duncan.cou...@worc.ox.ac.ukwrote:
Not since then, no. However a lot of things work fine, especially if you
use a newer Cabal version.
I've been unable to figure out how to build Cabal with Hugs
In testing some of my packages against Hugs, I've uncovered bugs[1].
Unfortunately the bug tracker at:
http://hackage.haskell.org/trac/hugs/newticket?type=defect
doesn't seem to allow normal users to submit tickets. Does anyone know
how to submit bug reports to Hugs these days?
[1]
John Goerzen wrote:
wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
realToFrac (1/0::Float) ::Double
3.402823669209385e38
Yes, I understand what you are saying and agree with you. But there
is nothing better
John Goerzen wrote:
wren ng thornton wrote:
John Goerzen wrote:
wren ng thornton wrote:
I once again point out that realToFrac is *wrong* for converting from
Float or Double.
Yes, I understand what you are saying and agree with you. But there
is nothing better in the standard
Duncan Coutts wrote:
Michael D. Adams wrote:
Is there a good reason why Rational is defined in a way that it can
not represent Nan, Inf and -Inf? (Any other exceptional values I
forgot?) Would fixing the definition so that it can represent those
values be sufficient to fix this entire
-- logfloat 0.10, 0.11
This package provides a type for storing numbers in the log-domain,
primarily useful for preventing underflow when multiplying many
probabilities as in HMMs and other probabilistic
Gregg Reynolds wrote:
Hi,
I think I've finally figured out what a monad is, but there's one
thing I haven't seen addressed in category theory stuff I've found
online. That is the relation between type constructors and data
constructors.
As I understand it, a type constructor Tcon a is
Gregg Reynolds wrote:
On Sat, Jan 31, 2009 at 4:26 PM, wren ng thornton w...@freegeek.org wrote:
But a data constructor Dcon a is an /element/ mapping taking elements
(values) of one type to elements of another type. So it too can be
construed as a functor, if each type itself
Gregg Reynolds wrote:
Hi,
The concept of type seems to be a little like porno: I know it when
I see it, but I can't define it (apologies to Justice Stewart). I've
picked through lots of documents that discuss types in various ways,
but I have yet to find one that actually says what a type
Marc Weber wrote:
A lot of people are suggesting using Bytestrings for performance,
strictness whatsoever reasons.
However how well do they talk to other libraries?
I'm not sure how you mean?
For passing them around: If someone's trying to combine your library
(version using ByteStrings)
Thomas Davie wrote:
I can imagine the styling language having the meaning function from
documents onto geometry, but the document description language is
harder. Ideally what I'd like to do with it is to make it describe
*only* the logical structure of the information being conveyed –
Marc Weber wrote:
wren ng thornton wrote:
I'd just stick with one (with a module for hiding the conversions, as
desired). Duplicating the code introduces too much room for maintenance and
compatibility issues.
That's the big thing. The more people that use ByteStrings the less need
Gregg Reynolds wrote:
On Mon, Feb 2, 2009 at 2:25 PM, Ketil Malde ke...@malde.org wrote:
Gregg Reynolds d...@mobileink.com writes:
Just shorthand for something like data Tcon a = Dcon a, applied to Int.
Any data constructor expression using an Int will yield a value of type
Tcon
Int.
Gregg Reynolds wrote:
Right, but that's only because the compiler either somehow knows about
side effects or there is some other mechanism - e.g. an implicit World
token that gets passed around - that prevents optiimization. As far
as the formal semantics of the language are concerned, there's
Rafael Gustavo da Cunha Pereira Pinto wrote:
What I miss most is a data structure with O(1) (amortized) direct access.
Finger trees get close, O(log(min(i,n-i))):
http://hackage.haskell.org/packages/archive/containers/latest/doc/html/Data-Sequence.html
(And Theta(1) amortized for all
Roman Cheplyaka wrote:
* Peter Verswyvelen bugf...@gmail.com [2009-02-05 16:35:34+0100]
On Thu, Feb 5, 2009 at 4:32 PM, Ketil Malde ke...@malde.org wrote:
Peter Verswyvelen bugf...@gmail.com writes:
1) hg st
darcs cha -s
That seems to list all changes in the history.
hg st lists local
Gregg Reynolds wrote:
On Thu, Feb 5, 2009 at 7:19 PM, wren ng thornton w...@freegeek.org wrote:
Gregg Reynolds wrote:
as the formal semantics of the language are concerned, there's no
essential difference between getChar = \x - getChar and Foo 3
= \x - Foo 7 for some data constructor Foo
Tim Newsham wrote:
The only difference with IO then is that to get IO programs to run,
you have
to do it inside another IO program.
Almost. Add to your mental model a runIO that is invoked when your
program runs as: runIO main. Your haskell compiler or interpretter
arranges this for
Gregg Reynolds wrote:
Tillmann Rendel wrote:
An example where it would be wrong to ignore e:
sum ([1, 2] = const [21])
This expression should evaluate to sum [21, 21] = 42, not sum [21] = 21.
Sigh. I hate it when this happens. Just when I thought I had it figured
out, it turns out I'm
Richard O'Keefe wrote:
Gregg Reynolds wrote:
Sure, you can treat a morphism as an object, but only by moving to a
higher (or different) level of abstraction.
False as a generalisation about mathematics.
False about functional programming languages, the very essence
of which is treating
minh thu wrote:
Joachim Breitner:
I thought about Zippers, but I understand that they improve _navigating_
in a Tree-like structure, or to refrence _one_ position in a tree.
But if I would deconstruct my tree to the list of _all_ locations, with
type Loc a = (Tree a, Cxt a)
and then run
Alberto G. Corona wrote:
forwarded:
Yes! if no state is passed, the optimization makes sense and the term is
not executed, like any lazy evaluation. For example, I used the debugger
(that is, without optimizations) to verify it with the Maybe monad:
op x= x+x
print $ Just (op 1) = \y- return
Corey O'Connor wrote:
Part of the reason they seem awkward to me is that I expect the
difference between version numbers to indicate something about what
has changed between the two versions. This only ends up being a
heuristic but a useful one. Date based version numbers don't
communicate much
Cristiano Paris wrote:
Manlio Perillo wrote:
Cristiano Paris ha scritto:
I'm interested in the possibility of
stopping/pickling/unpickling/resuming a computation.
Not sure this is a good thing in a web application.
I'm thinking of complex workflows and inversion of control.
A
Matthew Elder wrote:
would love to see this.
basic features first i suppose. here are some of my ideas:
1. browseable change history with preview pane (preview pane shows
diff and patch message)
Extending this idea, I'd like to see some 3D visualization of the file
hierarchy and the
Chung-chieh Shan wrote:
wren ng thornton wrote:
It's ugly, but one option is to just reify your continuations as an ADT,
where there are constructors for each function and fields for each
variable that needs closing over. Serializing that ADT should be simple
(unless some of those
John A. De Goes wrote:
On Feb 13, 2009, at 2:11 PM, Jonathan Cast wrote:
The compiler should fail when you tell it two mutually contradictory
things, and only when you tell it two mutually contradictory things.
By definition, it's not a contradiction when the symbol is unambiguously
Louis Wasserman wrote:
I follow. The primary issue, I'm sort of wildly inferring, is that use of
STT -- despite being pretty much a State monad on the inside -- allows
access to things like mutable references?
That's exactly the problem. The essential reason for ST's existence are
STRefs
Isaac Dupree wrote:
Natural numbers under min don't form a monoid, only naturals under max do (so
you can have a zero element)
Though, FWIW, you can use Nat+1 with the extra value standing for
Infinity as the identity of min (newtype Min = Maybe Nat).
I bring this up mainly because it can
Eugene Kirpichov wrote:
Looks like such a thing would be useful; as for now, I see at least
two applications: Data.Map and Data.Trie (bytestring-trie) - it's a
pity that they have rather similar interfaces, but the latter lacks
many methods and some are named in a different way.
Are there any
Achim Schneider wrote:
wren ng thornton w...@freegeek.org wrote:
(b) allows
instances to have a fixed type for keys (like Data.Trie and
Data.IntMap have),
Can't we do some type magic to automagically select Data.Trie if the
key is a (strict) bytestring?
Uh, sure. I was thinking more
Achim Schneider wrote:
Thomas DuBuisson thomas.dubuis...@gmail.com wrote:
I still prefer showing all platform results sorted into separate
sections with headers, but understand that I am in the minority.
You aren't alone. Labelling them prominently with POSIX, UNIX, Linux,
*BSD, OSX resp.
Luis O'Shea wrote:
One way to do this is to stack two StateTs on top of m.
Another way, what might be easier to reason about, is to crush those two
layers together and use a tuple for the state:
StateT s1 (StateT s2 m) a == StateT (s1,s2) m a
Then the only thing you'll have to worry
Kenneth Hoste wrote:
Well, I'm using UArray, but I'm willing to consider other suitable
containers...
As long as they are memory efficient. :-)
The typical usage of a UArray will be getting all it's contents,
and converting it to a list to easily manipulate (filter, ...).
So, maybe another
Neil Mitchell wrote:
2) The storage for String seems to be raw strings, which is nice.
Would I get a substantial speedup by moving to bytestrings instead of
strings? If I hashed the strings and stored common ones in a hash
table is it likely to be a big win?
Bytestrings should help. The big
Holger Siegel wrote:
loop alpha b (c:cs)
= let alpha' = max(alpha, - negascout c d (-b) (-alpha))
in if alpha' = beta
then alpha'
else if alpha' = b
then let alpha'' = - negascout c d (-beta) (-alpha')
in if
Phil wrote:
| After some googling it looked like the answer may be Monad Transformers.
| Specifically we could add a StateT transform for our Box Muller state
to our
| VanDerCorput State Monad.
| Google didn¹t yield a direct answer here so I¹m not even sure if my
| thinking is correct,
Larry Evans wrote:
Except that a kind sounds like a universe at level 2 or 3.
IOW, I guess haskell types are at level 1, and kines at level 2?
Then I guess values would be at level 0?
Exactly.
Is there some version of haskell that has more levels in its
type universe. If not, it there some
Svein Ove Aas wrote:
Martin Huschenbett wrote:
instance (Show a,Read a) = Binary a where
put = put . show
get = fmap read get
But then you will need the following language extensions: FlexibleInstances,
OverlappingInstances, UndecidableInstances
Well, isn't there a good chance it'll end
Phil wrote:
Again I understand that foldl' is the strict version of foldl, and as we are
summing elements we can use either foldl or foldr. I'm assuming this is
another thunk optimisation. Does foldl not actually calculate the sum, but
moreover it creates an expression of the form
Andrew Hunter wrote:
Several times now I've had to define an EDSL for working with
(vaguely) numeric expressions. For stuff like 2*X+Y, this is easy,
looking pretty much like:
data Expr = Const Integer | Plus Expr Expr | Times Expr Expr
instance Num Expr where
fromInterger = Const
(+) = Plus
Gleb Alexeyev wrote:
Here's my attempt though it's not really different from using built-in
lists:
viewCL CatNil = Nothing
viewCL (Wrap a) = Just (a, CatNil)
viewCL (Cat a b) = case viewCL a of
Nothing - viewCL b
Just (x, xs) - Just (x, Cat xs b)
My
Loup Vaillant wrote:
- support algebraic data types and case expressions (unless I can get
away with encoding them as functions),
Which you always can,
data Foo = A a1...an | B b1...bn |...
==
type Foo :: forall r.
(a1-...-an - r) -
(b1-...-bn - r)
Manlio Perillo wrote:
Duncan Coutts ha scritto:
On Sun, 2009-03-08 at 10:00 -0400, Gwern Branwen wrote:
http://hackage.haskell.org/trac/hackage/ticket/244
http://hackage.haskell.org/trac/hackage/ticket/299
Thanks Gwern. Yes, we're looking for a volunteer to work on implementing
this.
Rick R wrote:
Where can I find more information on STGs? Google search doesn't bring up
anything too enlightening.
My curiosity was piqued by http://www.cs.chalmers.se/~gedell/ssc/index.html.
Of course it doesn't indicate how these should be built or the format.
Perhaps
Mark Spezzano wrote:
Because Haskell is not OO, it is functional, I was wondering if there is
some kind of analogous “design pattern”/”template” type concept that
describe commonly used functions that can be “factored out” in a general
sense to provide the same kind of usefulness that Design
R J wrote:
2. I believe that the reverse implementation--namely, implementing
foldr in terms of foldl--is impossible. What's the proof of that?
As others have said, foldr in terms of foldl is impossible when infinite
lists are taken into account. For finite lists it's easy though:
(\f z
R J wrote:
I need to write an implementation using foldl, and a separate implementation using foldr,
of a function, remdups xs, that removes adjacent duplicate items from the
list xs. For example, remdups [1,2,2,3,3,3,1,1]= [1,2,3,1].
My approach is first to write a direct recursion, as
Yusaku Hashimoto wrote:
Hello,
I was studying about what unsafeInterleaveIO is.I understood
unsafeInterleaveIO takes an IO action, and delays it. But I couldn't
find any reason why unsafeInterleaveIO is unsafe.
I have already read an example in
a...@spamcop.net wrote:
G'day all.
Quoting wren ng thornton w...@freegeek.org:
Most of the (particular) problems OO design patterns solve are
non-issues in Haskell because the language is more expressive.
...and vice versa. Some of the design patterns that we use in
Haskell, for example
Wolfgang Jeltsch wrote:
Am Dienstag, 17. März 2009 10:54 schrieben Sie:
I'm reading the Barr/Wells slides at the moment, and they say the
following:
Thus a category can be regarded as a generalized monoid,
What is a “generalized monoid”? According to the grammatical construction
(adjective
Gregg Reynolds wrote:
Imperative programmers also used it to describe programming patterns.
Implementations of things like Observer/VIsitor etc. are ad-hoc,
informal constructions; the equivalent in a functional language is a
mathematical structure (feel free to fix my terminology). I don't
Tim Newsham wrote:
Is there a symbolic evaluator for Haskell that will perform all
applications except on specified functions? Ie. I would love
something that would take
foldr (+) (6 `div` 5) [1,2,3*4]
and (+) (*) and return
1 + (2 + (3*4 + 1))
by performing all the applications
Günther Schmidt wrote:
the point I wanted to stress though is that the stack overflow does
actually not occur doing the recursive algorithm, just a build-up of
thunks.
The algorithm itself will eventually complete without the stack overflow.
The problem occurs when the result value is
Vasyl Pasternak wrote:
The entire code I placed on
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=2764
Could someone help me to make this code faster? I'd like to see
solution that will be elegant and fast, without heavy optimizations,
that will make code unreadable. Also, if it possible,
Xiao-Yong Jin wrote:
Hi,
I just feel it is not comfortable to deal with exceptions
only within IO monad, so I defined
tryArith :: a - Either ArithException a
tryArith = unsafePerformIO . try . evaluate
[...]
However, I guess unsafePerformIO definitely has a reason for
its name. As I read
Manlio Perillo wrote:
But this may be really a question of personal taste or experience.
What is more natural?
1) pattern matching
2) recursion
or
1) function composition
2) high level functions
Which is more natural:
* C-style for-loops (aka assembly while-loops), or
* any modern language's
Thomas Hartman wrote:
sorry, wrong function.
should be
partitions [] xs = []
partitions (n:parts) xs =
let (beg,end) = splitAt n xs
in beg : ( case end of
[] - []
xs - partitions parts xs)
It's not tail recursive, FWIW. The recursive expression has (:) as
Manlio Perillo wrote:
The main problem, here, is that:
- recursion and pattern matching are explained in every tutorial about
functional programming and Haskell.
This is the reason why I find them more natural.
- high level, Haskell specific, abstractions, are *not* explained in
normal
Dan Weston wrote:
So to be clear with the terminology:
inductive = good consumer?
coinductive = good producer?
So fusion should be possible (automatically? or do I need a GHC rule?) with
inductive . coinductive
Or have I bungled it?
Not quite. Induction means starting from base cases
Zachary Turner wrote:
On Tue, Mar 24, 2009 at 10:32 PM, wren ng thornton w...@freegeek.orgwrote:
Both of these conclusions seem quite natural to me, even from before
learning Haskell. It seems, therefore, that naturality is not the proper
metric to discuss. It's oft overlooked, but the fact
Henning Thielemann wrote:
Jonathan Cast wrote:
Xiao-Yong Jin wrote:
Could you elaborate more about why this kind of breakage
wouldn't happen if 'try' is used in an IO monad as intended?
It would. But it would happen in IO, which is allowed to be
non-deterministic. Pure Haskell is not
Colin Adams wrote:
2009/3/25 wren ng thornton w...@freegeek.org:
Most of the documentation is in research papers, and a normal
programmer don't want to read these papers.
Yes, and no. There is quite a bit of documentation in research papers, and
mainstream programmers don't read
Jules Bean wrote:
wren ng thornton wrote:
I have long been disappointed by a number of `error`s which shouldn't
be. For example, the fact that `head` and `div` are not total strikes
me as a (solvable) weakness of type checking, rather than things that
should occur as programmer errors
501 - 600 of 963 matches
Mail list logo