On Tue, Mar 06, 2007 at 10:19:12PM +, David House wrote:
On 06/03/07, Nicolas Frisby [EMAIL PROTECTED] wrote:
Composition with (.) builds a function, but you eventually want an
Int, so we can't just use (.), but we can come pretty close.
(sum . IntMap.elems . IntMap.IntersectionWith (\x
Hi,
On 1 Feb 2007, at 00:50, Alexy Khrabrov wrote:
Also see that sequence.complete.org has many code snippets in the blog
section. What would be a good way to systematize all such snippets
together with hpaste.org and those scrolling through the mailing list?
Perhaps some kind of ontology of
Claus Reinke wrote:
ps. i was somewhat shocked to read that SPJ wants FDs gone.
Why? Simon has good taste. :)
de gustibus non est disputandum ;)
FD have uses and problems and AT have uses and problems. starting anew
with the latter doesn't fix the problems, it just changes their form.
Wolfgang Jeltsch wrote:
Am Dienstag, 6. März 2007 12:09 schrieben Sie:
Wolfgang Jeltsch wrote:
[…]
However, Haddock outputs the following:
haddock: Warning: The interface file base.haddock could not be
read. Maybe it's from a later version of Haddock?
This happens with Haddock 0.8
On 3/7/07, mm [EMAIL PROTECTED] wrote:
f . g . h $ x
Alternativly,
(f . g . h) x
will work, too.
It always irks me that you don't actually save any horizontal space
using $. That is,
(e) x
has the same number of characters (incl spaces) as
e $ x
T.
--
Dr Thomas Conway You are
On 7 Mar 2007, at 09:44, Thomas Conway wrote:
On 3/7/07, mm [EMAIL PROTECTED] wrote:
f . g . h $ x
Alternativly,
(f . g . h) x
will work, too.
It always irks me that you don't actually save any horizontal space
using $. That is,
(e) x
has the same number of characters (incl spaces)
[EMAIL PROTECTED] wrote:
Simon Marlow wrote:
Anyway, I just wanted to point out that nowadays we have the option of
using imprecise exceptions to report errors in lazy I/O.
Is this really a solution? Currently, getContents reports no errors
but does perfect error recovery: the result of the
On Tue, 2007-03-06 at 10:31 +0100, Udo Stenzel wrote:
Neil Mitchell wrote:
As others have said though, I wouldn't worry overly about it. The
whole concept of static linking being wrong, but dynamic linking being
fine, when you can flip between the modes just by changing compiler,
is just
On Wed, 2007-07-03 at 11:11 +, Duncan Coutts wrote:
Once GHC supports dynamic linking on linux windows (as it does
currently on OSX) I think people will stop worrying/complaining.
About this issue. ;)
--
Michael T. Richter [EMAIL PROTECTED]
Disclaimer: Any people who think that
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
cornmouse wrote:
I have a txt file, which contains a paragraph. I am trying to read the file,
and pass the contents of the file as a string to another function
called createIndex. createIndex is a function to generate index of the
input string.
On Tue, 2007-03-06 at 03:00 +, Neil Mitchell wrote:
The whole concept of static linking being wrong, but dynamic linking
being fine, when you can flip between the modes just by changing
compiler, is just silly. You don't infringe (or uninfringe) copyright
with a command line flag.
Just
I'm having trouble building regex-pcre from
http://darcs.haskell.org/packages/regex-unstable/regex-pcre/
[EMAIL PROTECTED]:~/haskellInstalls/regex-pcre$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
First (after darcs pulling) it complained
[EMAIL
In the spirit of making easy things easy, here is a haskell from
shell one-line grepper, that uses regexen.
Now, if only I could get pcre-regex installed I would be quite
content. (Still stuck using posix RE for now.)
**
[EMAIL PROTECTED]:~/learning/haskell/UnixTools$ time
Is this really a solution? Currently, getContents reports no errors
but does perfect error recovery: the result of the computation prior to
the error is preserved and reported to the caller. Imprecise
exceptions give us error reporting -- but no error recovery. All
previously computed results are
On Mar 7, 2007, at 7:02 , Thomas Hartman wrote:
I'm having trouble building regex-pcre from
http://darcs.haskell.org/packages/regex-unstable/regex-pcre/
[EMAIL PROTECTED]:~/haskellInstalls/regex-pcre$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
First (after
1) Chris was correct, I wasn't pulling from unstable, but stable. My bad.
[EMAIL PROTECTED]:~/haskellInstalls/regex-pcre$ darcs pull
Pulling from http://darcs.haskell.org/packages/regex-pcre;...
No remote changes to pull in!
2) When I did as brandon suggested, it seems to have built ok.
with PCRE. now (and yep, it's a lot faster than posix):
***
[EMAIL PROTECTED]:~/learning/haskell/UnixTools$ ./q-words.sh
q
qua
quack
quacked
quackery
quackery's
quacking
quacks
quad
quad's
real0m6.691s
user0m2.460s
F, FD, FC, AT, SPJ ;) WTH does it mean?
On Wed, Mar 07, 2007 at 10:12:11AM +0100, [EMAIL PROTECTED] wrote:
Claus Reinke wrote:
ps. i was somewhat shocked to read that SPJ wants FDs gone.
Why? Simon has good taste. :)
de gustibus non est disputandum ;)
FD have uses and problems
Okay, so much for PCRE match.
Can someone show me give me pointers on PCRE replace?
Ideal would be something with all the =~ s/// semantics from perl.
(Not sure if this is included in Text.Regex.PCRE. is it?)
In other words, how to do this with (preferrably) Text.Regex.PCRE ?
Of course in
Just noticed a comment in
http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutorial/
which says there's no perl-like regex replace in the library, and links to
http://hpaste.org/697
which is an attempt at providing one.
Not sure if this is useful or not.
2007/3/7,
Thomas Hartman wrote:
Just noticed a comment in
http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutorial/
which says there's no perl-like regex replace in the library, and links to
http://hpaste.org/697
which is an attempt at providing one.
Not sure if this
hi mm (?-),
F, FD, FC, AT, SPJ ;) WTH does it mean?
sorry about this acronymitis :) there was a lengthy debate about some of these
things in the context of haskell' a year or so ago, and i just fell back into
the mood,
forgetting to explain my acronyms before using them again
F: System
On Wed, 7 Mar 2007 20:44:42 +1100, you wrote:
It always irks me that you don't actually save any horizontal space
using $. That is,
(e) x
has the same number of characters (incl spaces) as
e $ x
Parentheses require you to maintain a mental general-purpose push-down
stack as you read the
Quoth Steve Schafer, nevermore,
Parentheses require you to maintain a mental general-purpose push-down
stack as you read the code. $, on the other hand, while it also requires
you to maintain a sort of stack, it's a monotonic stack: you may need
to push an arbitrary number of items, but you
On 06/03/07, Malcolm Wallace [EMAIL PROTECTED] wrote:
Well, our wiki to gather ideas is now up-and-running again:
http://hackage.haskell.org/trac/summer-of-code
We should probably remove projects that were succeessfully completed
last year, along with the lists of interested students on
Hello,
On 3/7/07, Claus Reinke [EMAIL PROTECTED] wrote:
AT: associated types, as in GHC
ATs are not in any of the official GHC releases... Are they in the CVS head?
-Iavor
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
ATs are not in any of the official GHC releases... Are they in the CVS head?
darcs, these days;-) but yes, from 6.7. see:
announcement
http://article.gmane.org/gmane.comp.lang.haskell.general/14447
main? info page
http://haskell.org/haskellwiki/GHC/Indexed_types
ghc status, with new features
Which is the longer way of saying you don't need to count to make sure
you closed all the brackets you opened! ;-)
Dougal Stanton
1) Emacs does the counting for me
2) parens don't surprise me if I happen to use rank-2 types.
i was bit enough times when learning why $ and runST don't like
| ATs are not in any of the official GHC releases... Are they in the CVS head?
The HEAD has fully-implemented associated *data types*, but not associated
*type synonyms*. We're working on the latter, quite hard. As Claus says, the
place to look is here
On 07/03/07, Nicolas Frisby [EMAIL PROTECTED] wrote:
1) Emacs does the counting for me
2) parens don't surprise me if I happen to use rank-2 types.
i was bit enough times when learning why $ and runST don't like each
other that I've grown averse of $. I also like thinking of building a
On 07/03/07, Thomas Conway [EMAIL PROTECTED] wrote:
Of course, what really gets me, is when I start trying to use $ in
type signatures and declarations:
... Map ByteString $ foo (bar baz) qux
It's almost possible! GHC gives us infix type synonyms:
type a $ b = a b
(Probably needs
I don't use rank-2 types that often and when I do I'm aware of the
restriction on ($) and similar hofs. I tend to use ($) only when the
right-hand side gets very messy; a multiple-line do or similar. For
example:
blah = fromMaybe $ do
x - blah1
y - blah2
guard (x == f y)
g x
The closing
Quoth Nicolas Frisby, nevermore:
Other than look at Darcs or GHC, has there been any efforts for
(very general, libertarian even) coding guidelines? Suggestions
tips might be a better word.
I think the unwritten word so far has been if you wouldn't hang it on a
wall in the Tate Modern then
[Also on
http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html]
Hi,
For a while I have been thinking: Isn’t there a way to get rid of the
intermediate Maybe construct in a common expression like “fromMaybe
default . lookup”. It seems that a way to do that would be to
Hi
For a while I have been thinking: Isn't there a way to get rid of the
intermediate Maybe construct in a common expression like fromMaybe
default . lookup. It seems that a way to do that would be to pass more
information to the Maybe-generating function: What to do with a
Just-Value, and what
Hello,
Your definition for Bool reminds me a bit of the definition for
booleans in Robert Dockins pure, untyped lambda calculus evaluator:
http://www.eecs.tufts.edu/~rdocki01/lambda/prelude.lam
http://www.eecs.tufts.edu/~rdocki01/lambda.html
j.
___
Joachim Breitner [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in
gmane.comp.lang.haskell.cafe:
[Also on
http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html]
This is known as the Church encoding of algebraic data types. In
this generality, it seems to be
On Wed, Mar 07, 2007 at 11:32:08PM +0100, Joachim Breitner wrote:
[Also on
http://www.joachim-breitner.de/blog/archives/229-A-different-Maybe-maybe.html]
Hi,
For a while I have been thinking: Isn???t there a way to get rid of the
intermediate Maybe construct in a common expression like
Joachim,
Don't stop at the booleans. Next you can define the natural numbers by
newtype Number = N (forall a.(a-a) - (a-a))
--
Dan
On 3/7/07, Joachim Breitner [EMAIL PROTECTED] wrote:
For a while I have been thinking: Isn't there a way to get rid of the
intermediate Maybe construct in a
Hey, welcome to to the group who have reinvented Church encoding of
data types. :)
-- Lennart
On Mar 7, 2007, at 22:32 , Joachim Breitner wrote:
[Also on http://www.joachim-breitner.de/blog/archives/229-A-
different-Maybe-maybe.html]
Hi,
For a while I have been thinking: Isn’t
I have built ghc-6.6 twice for 64-bit OpenBSD 4.0 with
LDFLAGS=-L/usr/local/lib set as an environmental variable. Both
times the built ghc did not find -lgmp until I modified
lib/ghc-6.6/package.conf by adding -L/usr/local/lib to ldOptions.
What do I set in order to have ldOptions set properly at
Hi All,
Consider the following:
foo = do
v - newTVar hi there!
throwDyn v
main = do
catchDyn (atomically foo) \v - do
x - atomically (readTVar v)
putStr x
I.e. throw information that gets rolled back from inside a
transaction, catch it and use it.
This looks like bad.
On Thu, Mar 08, 2007 at 12:25:15PM +1100, Thomas Conway wrote:
Hi All,
Consider the following:
foo = do
v - newTVar hi there!
throwDyn v
main = do
catchDyn (atomically foo) \v - do
x - atomically (readTVar v)
putStr x
I.e. throw information that gets
| type a $ b = a b
|
| (Probably needs -fglasgow-exts.) Sadly we don't have a fixity system
| for type operators :(
Actually GHC lets you give fixity declarations for type operators too.
NB that infix type constructors must start with :, just like infix data
constructors.
Simon
Congratulations! You've just reinvented Church encoding.
Do not let the multiple responses of how you apparently wasted your time
reinventing (or do they mean stealing?) something Church did long ago
dampen your enthusiasm to learn exciting things and then share them.
I for one am always
Hi all,
I noticed that in the polycode mode, lhs2TeX produces odd looking
output for hex constants.
E.g.
\begin{code}
wibble = 0x7F
\end{code}
It produces a nice little gap between the 0 and the x. Inspecting the
latex source, it even goes to some effort to do so:
\mathrm{0}\;\Varid{x7F}
I
46 matches
Mail list logo