#define defObj(t) newtype t = t Obj deriving (A,B,C,D)
Blasphemy! :)
On 14 September 2010 23:01, John Meacham j...@repetae.net wrote:
On Tue, Sep 14, 2010 at 01:24:16AM -0700, Kevin Jardine wrote:
I have a set of wrapper newtypes that are always of the same format:
newtype MyType =
Hi,
Just did a preview of bug #3693 [1] and saw that there are a few
patches issued there. Does this mean that the problem is solved and
there would be stack traces in a future version of GHC?
I'll test the patches in 24 hours, when I'll be back at home.
--
Mihai
[1]:
That's what I had originally. However, some people have made critical
comments about CPP macros on this list and I thought that TH was
considered the better option.
I was one of those people advising against the use of CPP macros.
However, Template Haskell is ghc-only, and is unlikely ever
On 15 September 2010 18:10, Mihai Maruseac mihai.marus...@gmail.com wrote:
Hi,
Just did a preview of bug #3693 [1] and saw that there are a few
patches issued there. Does this mean that the problem is solved and
there would be stack traces in a future version of GHC?
I'll test the patches
Sorry, updated now :)
http://hackage.haskell.org/trac/ghc/ticket/3693
On Wed, Sep 15, 2010 at 11:45 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 15 September 2010 18:10, Mihai Maruseac mihai.marus...@gmail.com wrote:
Hi,
Just did a preview of bug #3693 [1] and saw that there
The past year I have been working on a port of my machine learning project
named LExAu from Java to Haskell. I'm still very glad I took the jump, because
the complexity curve appears to be log shaped rather than exp shaped. In one
year I almost got to the functionality that had taken me five
On Wednesday 15 September 2010 02:50:15, David Terei wrote:
On 13 September 2010 20:41, Vo Minh Thu not...@gmail.com wrote:
... the post is from 2008. No LLVM goodness. So I thought GHC 6.12.1
(not the latest and greatest HEAD) would be enough.
I compiled the two programs myself out of
Hello,
I would want to ask if there is any set of real Haskell 98 programs
publicly available. I am working on a program transformation and I would
want to test it with several real programs. I think it is a good idea
to have a set of standard programs that people could use to check the
The nobench suite.
2010/9/15 Enrique Martín emart...@fdi.ucm.es:
Hello,
I would want to ask if there is any set of real Haskell 98 programs
publicly available. I am working on a program transformation and I would
want to test it with several real programs. I think it is a good idea to
have
Thanks all for your answsers. I still wonder why some people get very
different results between gcc and ghc, and some others don't. A
difference in processor?
I guess I will crank up a little package using criterion and producing
two executables to make sure anyone who run the benchmark use the
2010/9/15 Enrique Martín emart...@fdi.ucm.es:
Hello,
I would want to ask if there is any set of real Haskell 98 programs
publicly available. I am working on a program transformation and I would
want to test it with several real programs. I think it is a good idea to
have a set of standard
On Wednesday 15 September 2010 12:22:24, Vo Minh Thu wrote:
Thanks all for your answsers. I still wonder why some people get very
different results between gcc and ghc, and some others don't. A
difference in processor?
Architecture (32/64-bit, x86/..., ...), processor, gcc version, OS, all
Dear Haskellers,
The recent discussion indicates there is consensus for forming a
haskell.org committee. We are therefore calling for nominations for
members of the initial committee.
To nominate yourself, please send an e-mail to commit...@haskell.org by
29 September 2010.
Please feel free to
Hi Ivan,
HaRe itself is not Haskell 98, but for testing purposes we have used various
Haskell 98 programs and test suites. One rather large full Haskell 98 program
that we have used to test HaRe is nhc:
http://www.cs.york.ac.uk/fp/nhc98/
nhc also comes with various Haskell 98 test suites, all
Hi Malcolm,
In this case, I am counting on GHC's
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
feature to derive the instances for the classes I am including in the
deriving clause.
So perhaps portability is not a big issue here in any case.
I do think that
defObj(MyType)
looks a bit cleaner
On Wed, Sep 15, 2010 at 2:11 PM, Kevin Jardine kevinjard...@gmail.com wrote:
I do think that
defObj(MyType)
looks a bit cleaner than
$(defObj MyType)
I believe as of GHC 6.12 you no longer need the $() around top-level
splices. So that would just be:
defObj MyType
Hi,
I'v been reading a small paper/lesson on writing parser combinators in Haskell,
and it seems more or less straightforward. In this case a parser is defined
thusly:
type Parser a = String - Maybe (a, String)
And then it goes on to list some simple parsers, and then starts going on about
Hi Ben,
Good point! I can confirm that it does compile under GHC 6.12.
So really the same number of characters either way.
Kevin
On Sep 15, 4:49 pm, Ben Millwood hask...@benmachine.co.uk wrote:
On Wed, Sep 15, 2010 at 2:11 PM, Kevin Jardine kevinjard...@gmail.com wrote:
I do think that
On 15 Sep 2010, at 16:29, Matias Eyzaguirre wrote:
Hi,
I'v been reading a small paper/lesson on writing parser combinators in
Haskell, and it seems more or less straightforward. In this case a parser is
defined thusly:
type Parser a = String - Maybe (a, String)
And then it goes on to
On 9/15/10 1:31 AM, Malcolm Wallace wrote:
[...] However, Template Haskell is ghc-only, and is unlikely ever to
be implemented by any other Haskell compiler. [...]
Could it be implemented as a separate preprocessor?
Cheers,
Greg
___
Haskell-Cafe
Check out the evaluate function in Control.Exception.
Also note that if you apply seq to an IO action, you do *not* force the
result, only the action that will eventually produce the result.
Cheers,
Greg
On 9/15/10 2:13 AM, Jeroen van Maanen wrote:
The past year I have been working on a
On 13 September 2010 20:54, Paolo Giarrusso p.giarru...@gmail.com wrote:
On Sun, Sep 12, 2010 at 20:46, Tillmann Rendel
ren...@mathematik.uni-marburg.de wrote:
Paolo Giarrusso wrote:
in a tracker entry you linked to,
http://hackage.haskell.org/trac/hackage/ticket/704, duncan argues that
we
On 15/09/10 10:13, Jeroen van Maanen wrote:
The past year I have been working on a port of my machine learning project
named LExAu from Java to Haskell. I'm still very glad I took the jump, because
the complexity curve appears to be log shaped rather than exp shaped. In one
year I almost got
You may get useful help from Haskell Cafe. But if you can produce a cut-down
example without complex dependencies, we could also look at it.
Simon
| -Original Message-
| From: haskell-cafe-boun...@haskell.org [mailto:haskell-cafe-
| boun...@haskell.org] On Behalf Of Jeroen van Maanen
|
It has been - there is a package called 'zeroth' on hackage.
It only works for top-level splices, the last I looked.
On Sep 15, 2010 11:20 AM, Gregory Crosswhite gcr...@phys.washington.edu
wrote:
On 9/15/10 1:31 AM, Malcolm Wallace wrote:
[...] However, Template Haskell is ghc-only, and is
I feel that there is something that I don't understand completely: I have
been told that Haskell does not memoize function call, e.g.
slowFib 50
will run just as slowly each time it is called. However, I have read that
Haskell has call-by-need semantics, which were described as lazy evaluation
Hi Duncan,
first, thanks for coming yourself to answer.
On Wed, Sep 15, 2010 at 18:33, Duncan Coutts
duncan.cou...@googlemail.com wrote:
On 13 September 2010 20:54, Paolo Giarrusso p.giarru...@gmail.com wrote:
On Sun, Sep 12, 2010 at 20:46, Tillmann Rendel
ren...@mathematik.uni-marburg.de
On 15 September 2010 16:29, Matias Eyzaguirre dente...@gmail.com wrote:
Secondly, (and more importantly, or at least more interesting) I can see how
one would make a generator for simple compound data types, but how on earth
do you make a generator produce
On 9/15/10, Alex Rozenshteyn rpglove...@gmail.com wrote:
I feel that there is something that I don't understand completely: I have
been told that Haskell does not memoize function call, e.g.
slowFib 50
will run just as slowly each time it is called. However, I have read that
Haskell has
Antoine,
Thank you very much for your reply. Adding type sigs did help me think
about it. I got it to work.
I replaced:
eol = char '\n'
textLines = endBy eol
with:
textLine :: Parser String
textLine = do
x - many (noneOf \n)
char '\n'
return x
textLines :: Parser [String]
Chad Scherrer chad.scherrer at gmail.com writes:
Second attempt:
doc :: IO Put
doc = docLength = go
where
go 1 = word
go n = do
w - word
ws - go (n-1)
return (w putSpace ws)
This one actually works, but it holds onto everything in memory
instead of outputting as
On Wednesday 15 September 2010 22:38:48, Tim Chevalier wrote:
On the other hand, if you wrote:
let fib50 = slowFib 50 in
fib50 + (slowFib 50)
then (slowFib 50) would be evaluated twice, because there's no
principle requiring the compiler to notice that (slowFib 50) is the
same expression
On Wednesday 15 September 2010 23:01:34, Peter Schmitz wrote:
textLine :: Parser String
textLine = do
x - many (noneOf \n)
char '\n'
return x
textLines :: Parser [String]
textLines = many textLine
And it can probably be coded more succinctly that that (suggestions
Daniel,
Thanks much; the more I learn Haskell and Parsec, the more I like them.
-- Peter
On Wed, Sep 15, 2010 at 4:02 PM, Daniel Fischer
daniel.is.fisc...@web.de wrote:
On Wednesday 15 September 2010 23:01:34, Peter Schmitz wrote:
textLine :: Parser String
textLine = do
x - many
All,
Ironing out crypto-api, I have commited the below changes mostly
intended to streamline crypto-api and focus it on the main purpose of
connecting algorithm developers with slightly higher-level (and
generic) function needed by crypto-users. Feel free to object,
comment, or recommend
On 16 September 2010 01:58, Thomas Davie tom.da...@gmail.com wrote:
Firstly, as far as i can tell, one cannot declare a type synonym to be an
instance of a type class, thus how would you make it an instance of
Arbitrary?
The standard solution here is to create a newtype, and generate them
On Wed, Sep 15, 2010 at 9:54 PM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
* cereal = 0.2 0.3 (was == 0.2.*)
Do you mean, = 0.2 0.4?
Cheers! =)
--
Felipe.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Wed, Sep 15, 2010 at 6:38 PM, Felipe Lessa felipe.le...@gmail.com wrote:
On Wed, Sep 15, 2010 at 9:54 PM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
* cereal = 0.2 0.3 (was == 0.2.*)
Do you mean, = 0.2 0.4?
Yes, that was what I ment, thanks!
Hi Alex,
In Haskell, data structures cache, while functions do not.
Memoization is conversion of functions into data structures (and then
trivially re-wrapping as functions) so as to exploit the caching property of
data structures to get caching functions.
- Conal
On Wed, Sep 15, 2010 at
Not that I'm having any problem with parsec 2.1.0.1, but I guess I
would like to install the latest (3.1.0), unless there is a reason
not to.
I can't seem to get Cabal to do so; thanks in advance for any help.
I don't understand part of the output from cabal install --dry-run
--reinstall -v
Parsec 3 is unloved by much of the community because it's evidently
slower than parsec 2. For this reason the community remains divided
over the two versions and cabal has special preferred versions of
particular packages. To force installation of parsec 3, over the
preferred parsec 2, you
On 16 September 2010 12:47, Peter Schmitz ps.hask...@gmail.com wrote:
Not that I'm having any problem with parsec 2.1.0.1, but I guess I
would like to install the latest (3.1.0), unless there is a reason
not to.
Because Parsec-3 apparently still has some speed regressions compared
to Parsec-2
Thomas,
Ivan,
Thanks much for the info.
-- Peter
On Wed, Sep 15, 2010 at 8:00 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 16 September 2010 12:47, Peter Schmitz ps.hask...@gmail.com wrote:
Not that I'm having any problem with parsec 2.1.0.1, but I guess I
would like to
On Wed, Sep 15, 2010 at 7:47 PM, Peter Schmitz ps.hask...@gmail.com wrote:
Not that I'm having any problem with parsec 2.1.0.1, but I guess I
would like to install the latest (3.1.0), unless there is a reason
not to.
I can't seem to get Cabal to do so; thanks in advance for any help.
I
On 9/15/10 9:11 AM, Kevin Jardine wrote:
Hi Malcolm,
In this case, I am counting on GHC's
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
feature to derive the instances for the classes I am including in the
deriving clause.
So perhaps portability is not a big issue here in any case.
Yes, but
On Fri, Sep 10, 2010 at 2:00 PM, S. Doaitse Swierstra
doai...@swierstra.net wrote:
I show how this can be done using uu-parsinglib. Note that we have sevral
parsers, each having its own type:
Thanks for such a complete example, Doaitse! Unfortunately I have a
requirement I didn't disclose: the
Jason,
Thank you for the insights into Cabal. I am new to Parsec, and
relatively new to Cabal, and was not aware of the info that you (and
Thomas and Ivan) posted. Great help; thanks again.
I will probably stick with Cabal's default for the time being because
I don't have a compelling reason not
On 16 September 2010 13:52, Peter Schmitz ps.hask...@gmail.com wrote:
I will probably stick with Cabal's default for the time being because
I don't have a compelling reason not to, but it's good to know how
Cabal works.
Well, despite having a compatability API, Parsec-3 also has a
completely
On 9/15/10 10:39 PM, Conal Elliott wrote:
Hi Alex,
In Haskell, data structures cache, while functions do not.
Exactly. What this means is that when you call (slowFib 50) Haskell does
not alter slowFib in any way to track that it maps 50 to $whatever;
however, it does track that that
On 9/13/10 6:22 AM, Michael Lazarev wrote:
Thanks for examples and pointers.
Since I came from Lisp, it never occurred to me that let and lambda
are different constructs in Haskell.
I thought that
let x = y in f
is really
(\x - f) y
It turns out that let is about declarations which
On 9/13/10 6:23 PM, Paolo G. Giarrusso wrote:
Then, I would also like to understand what exactly a strict functor
is, in detail, and/or a link to the post you reference.
I'm assuming the OP was referring to a functor for strictness I
mentioned recently in the discussion about pointed
I have a
requirement I didn't disclose: the simple tags like TRNUID, NAME,
AMOUNT could come in any order; and some are optional.
Search for permutation parsing; Doaitse has thought of that too!
Regards,
Malcolm
___
Haskell-Cafe mailing list
52 matches
Mail list logo