s.clover:
HStringTemplate is a port of Terrence Parr’s lovely StringTemplate
(http://www.stringtemplate.org) engine to Haskell.
It is available, cabalized, at:
darcs get http://code.haskell.org/HStringTemplate/
Looks very useful! Will this be on hackage.haskell.org soon?
I can't wait
There is no technical reason for this. It's a matter of taste. As someone
else pointed out, different arities is usually a bug.
-- Lennart
On Jan 13, 2008 3:12 PM, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi,
It's nice to write functions in point free style:
f = sort . nub
But
Yes, the VS Shell indeed looks an attractive platform, because it's free. It'd
be great if someone wanted to port Visual Haskell to the VS Shell.
Simon
| -Original Message-
| From: Peter Verswyvelen
| Sent: 13 January 2008 21:15
| Subject: Re: [Haskell-cafe] Possibility to port
Yes, would be really nice. And in the meanwhile update it to GHC 6.8.2
and add support for debugging/stepping now that GHC supports it :-)
Peter
On Mon, 2008-01-14 at 08:45 +, Simon Peyton-Jones wrote:
Yes, the VS Shell indeed looks an attractive platform, because it's free.
It'd be
It would be pretty neat for Haskell hacking if the Emacs Haskell mode
could do the following. Imagine you have written some code like so:
-- | The parse state.
data S = S {-# UNPACK #-} !B.ByteString -- current chunk
L.ByteString -- rest of the input
{-#
Don Stewart writes:
One textbook on algorithms with a functional approach is by Fethi Rabhi
and Guy Lapalme: Algorithms: A functional programming approach
published by Addison-Wesley, 235 pages, ISBN 0-201-59604-0
I'd imagine they wouldn't use many OCR unfriendly characters.
I perhaps
only one argument is allowed after the #! on the first line. however the
following should be portable if you must set the variable before
runhaskell is executed:
#!/bin/sh
-- /dev/null 21; MYENV=foo runhaskell $_
import System.Environment
main = getEnv MYENV = print
--
John Meacham -
Hello Neil,
Monday, January 14, 2008, 2:12:52 AM, you wrote:
But sometimes I have to add an extra case, on a certain value:
f [] = [1]
f = sort . nub
Is there a reason this isn't done?
this may be also due an error, and in most cases it actually will be
due an error. then it makes type
On 1/14/08, Johan Tibell [EMAIL PROTECTED] wrote:
It would be pretty neat for Haskell hacking if the Emacs Haskell mode
could do the following. Imagine you have written some code like so:
[...]
Binding a haskell-fold-source function to a key chain would enable you
to get a quick overview of
On Sun, Jan 13, 2008 at 12:25:53AM +0100,
Henning Thielemann [EMAIL PROTECTED] wrote
a message of 28 lines which said:
Caching is not the default, but you can easily code this by
yourself: Define an array and initialize it with all function
values. Because of lazy evaluation the function
Johan Tibell wrote:
Anyone with strong Emacs-fu that knows how one could implement such a
function?
This looks like a straightforward application of outline mode. I believe
it might be as simple as setting up a regex and enabling the mode, but
check the LISP source for outline mode or
I did find one paper that makes a start at such work, Enforcing
Strict Model-View Separation in Template Engines,
but the theory is a little weak and it focuses on the nebulous idea of
separation of model and view, as opposed to
a classification of capabilities and limitations.
When I did
On Jan 14, 2008 2:30 PM, Valery V. Vorotyntsev [EMAIL PROTECTED] wrote:
On 1/14/08, Johan Tibell [EMAIL PROTECTED] wrote:
It would be pretty neat for Haskell hacking if the Emacs Haskell mode
could do the following. Imagine you have written some code like so:
[...]
Binding a
Jonathan Cast [EMAIL PROTECTED] wrote:
On 13 Jan 2008, at 5:49 PM, Achim Schneider wrote:
Jonathan Cast [EMAIL PROTECTED] wrote:
On 13 Jan 2008, at 5:27 PM, Achim Schneider wrote:
Answer #2:
Because you can't write
f x = case x of
[] - [1]
- sort.nub
But why
On Fri, Jan 11, 2008 at 07:10:20PM -0800, Jonathan Cast wrote:
On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote:
David Roundy [EMAIL PROTECTED] wrote:
Prelude let x=1e-300/1e300
Prelude x
0.0
Prelude x/x
NaN
The true answer here is that x/x == 1.0 (not 0 or +Infinity), but
there's
PR Stanley wrote:
Can the list recommend books that use Haskell - or any FP language but
preferably Haskell - to illustrate the principles of compilers and/or
algorithms?
Try Andrew Appel's Modern Compiler Implementation in ML
http://www.cs.princeton.edu/~appel/modern/ml/ which, as it uses
Has the Haskell Program Coverage tool been integrated into Cabal? That is,
is there anything like runhaskell Setup.hs coverage to generate a coverage
report?
Thanks,
Greg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
garious:
Has the Haskell Program Coverage tool been integrated into Cabal? That
is, is there anything like runhaskell Setup.hs coverage to generate a
coverage report?
Not yet, but definitely on the todo list (its a variant of the test
target, that would add -fhpc to each compile, so
On Jan 13, 2008 5:54 AM, Torsten Otto [EMAIL PROTECTED] wrote:
Howdy,
with a just-in-time-learning approach I managed to teach my class of
advanced high schoolers the basics of functional programming using
Haskell (I had only used Scheme before). Now to show them that Haskell
That is
On 2008.01.14 13:34:42 +, Andrew Birkett [EMAIL PROTECTED] scribbled 0.8K
characters:
[EMAIL PROTECTED] wrote:
I'm going through them now, and I like them a lot. (Maybe I'll finally
begin doing stuff with Yi!)
Is there any particular reason you didn't put your tutorials on the
Haskell
On Jan 13, 2008 6:49 PM, apfelmus [EMAIL PROTECTED] wrote:
K. Claessen. Poor man's concurrency monad.
http://www.cs.chalmers.se/~koen/pubs/jfp99-monad.ps
P. Li, S. Zdancewic. Combining events and threads for scalable
network services.
Because apparently GHC works much better on Linux than Windows, I
switched to that platform. I'm currently trying Fedora 8. So now I'm
completely alone in the dark: no experience with Haskell, no experience
with Linux; I left decades of experience with Microsoft products behind
me ;-)
I tried
Hello all,
A Haskell gathering will take place for the first time in Israel:
Friday, January 18 2008 at 11:00 AM
Village Green, 33 Jaffa Rd, (corner of Rivlin St), Jerusalem
This will be an informal event where everyone can introduce themselves
and talk about their thoughts on Haskell. Everyone
Peter Verswyvelen [EMAIL PROTECTED] wrote:
Any hints?
Look at ghc --make -v and make sure that ghc uses the right -l and -L
options when it calls the linker.
--
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved.
Thank you for the encouragement, Justin. Unfortunately I did try that.
But it may also be where my basic understanding is missing: the
libraries - do I have to somehow compile all the source or can I just
use it? The source is Haskell, but it all comes with makefiles - are
these for use
Seeing my woes with FranTk - what else is out there that people use if
a (simple) GUI is desired for a Haskell app? Just a few textboxes and
a button or two would do me.
Thanks in advance!
Regards,
Torsten
___
Haskell-Cafe mailing list
Hi Torsten,
Seeing my woes with FranTk - what else is out there that people use if
a (simple) GUI is desired for a Haskell app? Just a few textboxes and
a button or two would do me.
Gtk2hs in GHC: http://www.haskell.org/gtk2hs/
Thanks
Neil
___
On Sun, 2008-01-13 at 14:54 +0100, Torsten Otto wrote:
Howdy,
with a just-in-time-learning approach I managed to teach my class of
advanced high schoolers the basics of functional programming using
Haskell (I had only used Scheme before). Now to show them that Haskell
is not a weirdo
Felipe Lessa wrote:
apfelmus wrote:
Oh, what kind of generalization do you have in mind?
Leaking Prompt(..) in the export list to the GUI code seems wrong to
me, I like 'runPromptM' because it hides the Prompt(..) data type from
the user [module]. But after some rest I think I found a nice
Lennart Augustsson wrote:
What is a reduction anyway?
I am not an expert but I thought in lambda calculus one has primitive rules
for evaluation, e.g. beta reduction. So a reduction is a 'smallest step' in
reducing an expression to normal form, no?
Cheers
Ben
On Jan 14, 2008 10:09 PM, Torsten Otto [EMAIL PROTECTED] wrote:
Seeing my woes with FranTk - what else is out there that people use if
a (simple) GUI is desired for a Haskell app? Just a few textboxes and
a button or two would do me.
Thanks in advance!
I like wxHaskell. It seems that
Ben Franksen wrote:
Lennart Augustsson wrote:
What is a reduction anyway?
I am not an expert but I thought in lambda calculus one has primitive rules
for evaluation, e.g. beta reduction. So a reduction is a 'smallest step' in
reducing an expression to normal form, no?
Yes and no, a single
paul:
I was recently sent a patch for my Ranged Sets library which exported
all the QuickCheck properties. I'd left them unexported on the grounds
that they clutter up the documentation (although simplified versions are
included in the documentation) and you can easily run them with the
[EMAIL PROTECTED] wrote:
Wolfgang Jeltsch wrote:
My impression is that staying close to math is good from a software
technology point of view. And it has the advantage of less confusion
for the user.
What does it mean close to math?
How close? Does math raise exceptions upon the division
I was recently sent a patch for my Ranged Sets library which exported
all the QuickCheck properties. I'd left them unexported on the grounds
that they clutter up the documentation (although simplified versions are
included in the documentation) and you can easily run them with the
standard
ndmitchell:
Hi
standard quickcheck script. The contributor, [EMAIL PROTECTED]
suggested an explicit test harness instead.
Unless you have a test harness (ideally through Cabal), the properties
will go out of sync, and you'll forget to run them. Tests are good,
they should be able to
[EMAIL PROTECTED] wrote:
When math says that something is undefined, in my little brain I
understand that there is no answer.
NO answer.
Math doesn't say that something is undefined, but tells you that you
did something that's illegal, i.e. impossible, in the system you're
working with.
Ben Franksen writes:
[EMAIL PROTECTED] wrote:
...
Does *MATH* answer the question what is: (0/0)==(0/0) ? Nope!
Exactly. So why try to give an answer in Haskell? MATH says: the
expression 0/0 is undefined, thus comparing (0/0)==(0/0) is undefined,
too. I would expect Haskell to say the
There's also the HOC (Haskell Objective-C bridge), which lets you use
Apple's Cocoa APIs.
Bob
On 14 Jan 2008, at 22:09, Torsten Otto wrote:
Seeing my woes with FranTk - what else is out there that people use
if a (simple) GUI is desired for a Haskell app? Just a few textboxes
and a
Achim Schneider writes:
[EMAIL PROTECTED] wrote:
When math says that something is undefined, in my little brain I
understand that there is no answer.
Math doesn't say that something is undefined, but tells you that you
did something that's illegal, i.e. impossible, in the system you're
On Jan 15, 2008 12:29 AM, [EMAIL PROTECTED] wrote:
Ben Franksen writes:
[EMAIL PROTECTED] wrote:
...
Does *MATH* answer the question what is: (0/0)==(0/0) ? Nope!
Exactly. So why try to give an answer in Haskell? MATH says: the
expression 0/0 is undefined, thus comparing (0/0)==(0/0)
[EMAIL PROTECTED] wrote:
Achim Schneider writes:
[EMAIL PROTECTED] wrote:
When math says that something is undefined, in my little brain I
understand that there is no answer.
Math doesn't say that something is undefined, but tells you that you
did something that's illegal,
On Sun, Jan 13, 2008 at 01:08:49AM +0100, Henning Thielemann wrote:
Is there a fast and reliable way to compute the fraction of a floating
point number?
no, and this has bothered me to the point I consider it a bug in the
language spec that all 'rounding' style functions give back an integral
On 14 Jan 2008, at 9:56 AM, David Roundy wrote:
On Fri, Jan 11, 2008 at 07:10:20PM -0800, Jonathan Cast wrote:
On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote:
David Roundy [EMAIL PROTECTED] wrote:
Prelude let x=1e-300/1e300
Prelude x
0.0
Prelude x/x
NaN
The true answer here is that
On Jan 14, 2008 2:28 PM, Felipe Lessa [EMAIL PROTECTED] wrote:
lastAttempt' :: AttemptCode
lastAttempt' showInfo entry button = guessGameNew = contPromptM done cont
where
cont :: forall a. GuessP a - (a - IO ()) - IO () -- signature needed
cont (Print s) c = showInfo s c
I'm absolutely planning to get it up there, but it needs a bit more
work first. Just today, gwern sent a bunch of very nice patches that
cleaned up some -Wall messages, and fixed a build issue with 6.8. And
then, thanks to an email from Martin Lütke, I realized that I had
foolishly not
In lambda calculus you can take a beta reduction as the step.
But Haskell is not normally implemented by lambda calculus so you have to
pick something else.
There are measures of reduction that you can come up with but they will
vary, e.g., by compiler, optimization level, etc.
I think time is a
Hi,
I'm trying to use ErrorT transformer based
on Don Stewart's Shell example:
http://cgi.cse.unsw.edu.au/~dons/blog/2007/03/10#programmable-semicolons
It's probably a trivial question, but I cannot figure out
how to implement the catchError function in:
instance MonadError String Shell where
I think that type classes with nontrivial requirements should export
QuickCheck properties that test those requirements. For example, the
Data.Monoid module
(http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Monoid.html)
could export properties that check the monoid laws (for an
On Jan 15, 2008, at 0:28 , Adam Smyczek wrote:
It's probably a trivial question, but I cannot figure out
how to implement the catchError function in:
instance MonadError String Shell where
throwError = error . (Shell failed: ++)
catchError l h = ???
Take a look at
On Mon, 14 Jan 2008, John Meacham wrote:
On Sun, Jan 13, 2008 at 01:08:49AM +0100, Henning Thielemann wrote:
Is there a fast and reliable way to compute the fraction of a floating
point number?
no, and this has bothered me to the point I consider it a bug in the
language spec that all
51 matches
Mail list logo