Excerpts from Kalman Noel's message of Tue Nov 17 07:47:14 +0100 2009:
Michael Snoyman schrieb:
control-monad-failure provides a basic notion of failure which does not
commit to any concrete representation.
It is just a version of the MonadError class without the annoying bits.
class
I've just uploaded deepseq-1.0.0.0 to Hackage
http://hackage.haskell.org/package/deepseq
This provides a DeepSeq class with a deepseq method, equivalent to the
existing NFData/rnf in the parallel package. I'll be using this in a
newly revamped parallel package, which I hope to upload
On Tue, Nov 17, 2009 at 12:00 PM, Simon Marlow marlo...@gmail.com wrote:
I've just uploaded deepseq-1.0.0.0 to Hackage
This is great! I often use rnf to fully evaluate some expression where
I didn't need parallelism at all. Time to update some packages.
Thank you,
Roel
Hello,
The release of the regular library for generic programming on Hackage
[1] also contains a form of deep seq [2]. This means that you don't
even have to write the definition of 'deepseq', you can just use
'gdseq' (assuming you have used Template Haskell to derive the generic
representations
Nicolas Pouillard schrieb:
class MonadFailure e m where failure :: e - m a
Why is it called MonadFailure (specifically, what's the Monad bit doing
there)?
Because of 'Monad m' being a superclass of 'MonadFailure e m'.
Here is the class:
class Monad m = MonadFailure e m where
failure :: e -
Excerpts from Kalman Noel's message of Tue Nov 17 12:55:54 +0100 2009:
Nicolas Pouillard schrieb:
class MonadFailure e m where failure :: e - m a
Why is it called MonadFailure (specifically, what's the Monad bit
doing
there)?
Because of 'Monad m' being a superclass of
| What's the status of the TDNR proposal [1]? Personally I think it is a
| very good idea and I'd like to see it in Haskell'/GHC rather sooner
| than later. Working around the limitations of the current record
| system is one of my biggest pain points in Haskell and TDNR would be a
| major
I've added an informal straw poll to the bottom of [1] to allow you to
express an opinion.
[1]: ?
signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Excerpts from Simon Marlow's message of Tue Nov 17 12:00:21 +0100 2009:
I've just uploaded deepseq-1.0.0.0 to Hackage
Great!
I'm wondering what is the need/purpose for DeepSeqIntegral and DeepSeqOrd?
--
Nicolas Pouillard
http://nicolaspouillard.fr
[Resending, this time with link; sorry]
| What's the status of the TDNR proposal [1]? Personally I think it is a
| very good idea and I'd like to see it in Haskell'/GHC rather sooner
| than later. Working around the limitations of the current record
| system is one of my biggest pain points in
Simon Peyton-Jones wrote:
| What's the status of the TDNR proposal [1]?
It's stalled. As far as I know, there's been very little discussion about it. It's not a trivial thing to implement, and it treads on delicate territory (how . is treated).
Having skimmed the page, it seems like the
Excellent. It seems that my sit-back-and-wait approach is slowly
resulting in all the libraries required to rewrite my old (Python)
password storage tool are being put into place :-)
/M
On Tue, Nov 17, 2009 at 2:38 AM, John Millikin jmilli...@gmail.com wrote:
The GNOME Keyring is a service for
On Tue, 2009-11-17 at 11:00 +, Simon Marlow wrote:
I've just uploaded deepseq-1.0.0.0 to Hackage
http://hackage.haskell.org/package/deepseq
This provides a DeepSeq class with a deepseq method, equivalent to the
existing NFData/rnf in the parallel package. I'll be using this in a
It's curious that Hugs lies...
Thanks for the answers :) .
2009/11/15 Lennart Augustsson lenn...@augustsson.net:
Hugs is wrong, as you can easily see by evaluating
let x = 123.35503 * 10.0 in x == read (show x)
With ghc it comes out as True and with Hugs as False.
-- Lennart
On Sat,
On Tue, Nov 17, 2009 at 1:18 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
| What's the status of the TDNR proposal [1]? Personally I think it is a
| very good idea and I'd like to see it in Haskell'/GHC rather sooner
| than later. Working around the limitations of the current record
|
On Tue, Nov 17, 2009 at 1:18 PM, Simon Peyton-Jones
simo...@microsoft.com wrote:
I've added an informal straw poll to the bottom of [1] to allow you to
express an opinion.
Forgive my ignorance, but I can not find a way to edit the wiki page.
What am I doing wrong?
Cheers,
Levi
Am Dienstag 17 November 2009 15:36:52 schrieb Levi Greenspan:
As pointed out by others one may choose a different string instead of
. like - if this makes the implementation of TDNR feasible.
Or, if both of these strings would make the implementation awkward, one can
choose a
different but
On Tue, Nov 17, 2009 at 3:00 AM, Simon Marlow marlo...@gmail.com wrote:
I've just uploaded deepseq-1.0.0.0 to Hackage
http://hackage.haskell.org/package/deepseq
This provides a DeepSeq class with a deepseq method, equivalent to the
existing NFData/rnf in the parallel package.
On Tue, Nov 17, 2009 at 5:18 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
| What's the status of the TDNR proposal [1]? Personally I think it is a
| very good idea and I'd like to see it in Haskell'/GHC rather sooner
| than later. Working around the limitations of the current record
|
On Tue, 2009-11-17 at 17:14 +0100, Sean Leather wrote:
module Main where
data A = A {x :: Int} deriving Show
main = print $ Just A {x = 5}
This led to an issue report [3] which developed a few responses. Some
don't like the grammar as defined, because, at a glance, it appears
too much
Sigh. Apologies. Turns out that [1] is not publicly editable. So I've created
a HaskellWiki page [2] and cross-linked them.
[2] http://haskell.org/haskellwiki/TypeDirectedNameResolution
You should be able to edit that!
Simon
| -Original Message-
| From:
On Nov 17, 2009, at 11:36 , Bryan O'Sullivan wrote:
On Tue, Nov 17, 2009 at 3:00 AM, Simon Marlow marlo...@gmail.com
wrote:
I've just uploaded deepseq-1.0.0.0 to Hackage
http://hackage.haskell.org/package/deepseq
This provides a DeepSeq class with a deepseq method, equivalent to
the
I'm trying to create a hash table. Yeah, I know, don't use hash tables, but I
need to create something I'm familiar with, not something I've never worked
with before. What's wrong with this code?
Michael
import Prelude hiding (lookup)
import Data.HashTable
data
Is there a deep reason (beyond saving a sentence
or two in the language definition) for requiring
all patterns in a function binding to have the
same explicit arity?
For example, in
dropWhile0 :: Num a = [a] - [a]
dropWhile0 (0:xs) = dropWhile0 xs
dropWhile0 xs = xs
why
Hello michael,
Tuesday, November 17, 2009, 10:16:50 PM, you wrote:
I'm trying to create a hash table. Yeah, I know, don't use hash
tables, but I need to create something I'm familiar with, not
something I've never worked with before. What's wrong with this code?
ht = MyHashTable.new (==)
Am Dienstag 17 November 2009 20:16:50 schrieb michael rice:
I'm trying to create a hash table. Yeah, I know, don't use hash tables, but
I need to create something I'm familiar with, not something I've never
worked with before. What's wrong with this code?
Michael
Am Dienstag 17 November 2009 20:36:46 schrieb Daniel Fischer:
What you probably wanted was
type MyHashTable = HashTable String Int -- not data MyHashTable
Just in case it's not clear:
ht - new (==) dummy :: IO MyHashTable
only works at the prompt or in an IO do-block, not at the top level
Thanks all,
Got it! type rather than data and - rather than = (should have remembered this
from monad stuff). Also, don't need the qualification.
Onward and upward.
Thanks,
Michael
--- On Tue, 11/17/09, Daniel Fischer daniel.is.fisc...@web.de wrote:
From: Daniel Fischer
Hi Daniel,
Thanks for the IO monad reminder.
What is GHC.Int.Int32? Can't find it on Hoogle.
Michael
==
*Main ht - new (==) dummy :: IO MyHashTable
interactive:1:15:
Couldn't match expected type `GHC.Int.Int32'
against inferred type `Int'
In
You don't need to create a new type for a String - Int hashtable, you
already get it for free because HashTable is a parameterized type.
Also, although you are apparently trying to make life simpler for
yourself using a HashTable, you are actually making like more
complicated because the
Am Dienstag 17 November 2009 21:09:26 schrieb michael rice:
What is GHC.Int.Int32? Can't find it on Hoogle.
Int32 is the guaranteed-to-be-32-bits integer type, it's defined in the module
GHC.Int,
typically it's imported via Data.Int (because, naturally, using GHC's own
modules isn't
Excerpts from Sean McLaughlin's message of Mon Nov 16 19:06:06 -0500 2009:
Hi. I'm aware of this option, and use it frequently to override the
default prelude, but it doesn't help this problem:
I suppose this is the appropriate quote from the GHC manual:
GHC normally imports Prelude.hi files
Look in Data.Int for a list of the Int types.
Basically you generally only use Int unless you are working at a lower-
level which has an explicit requirement for the number of bits. In
this case, HashTable has such a requirement, so you have two choices:
you can either change the type
Hello Daniel,
Tuesday, November 17, 2009, 11:21:18 PM, you wrote:
The hash function must have a return type of fixed and specified width, or
porting the app
between 32-bit and 64-bit platforms could have enormous performance impact,
so it can't be
plain Int.
i think that the problem with
Hi Gregory,
I was wondering about that, because of the following:
[1 of 1] Compiling Main ( hash1.hs, interpreted )
Ok, modules loaded: Main.
*Main ht - new (==) dummy :: IO MyHashTable
*Main dummy mike
7
*Main dummy michael
7
*Main insert ht mike 1
*Main toList ht
On Tue, Nov 17, 2009 at 4:00 PM, michael rice nowg...@yahoo.com wrote:
Hi Gregory,
I was wondering about that, because of the following:
[1 of 1] Compiling Main ( hash1.hs, interpreted )
Ok, modules loaded: Main.
*Main ht - new (==) dummy :: IO MyHashTable
*Main dummy mike
7
So, what you're telling me is, my dummy hash function IS being used, and
because of collisions the other values are placed in different locations?
Michael
--- On Tue, 11/17/09, Brad Larsen brad.lar...@gmail.com wrote:
From: Brad Larsen brad.lar...@gmail.com
Subject: Re: [Haskell-cafe] Simple
On Tue, Nov 17, 2009 at 4:22 PM, michael rice nowg...@yahoo.com wrote:
So, what you're telling me is, my dummy hash function IS being used, and
because of collisions the other values are placed in different locations?
Michael
[...]
If Data.HashTable is implemented using separate chaining,
Hello michael,
Wednesday, November 18, 2009, 12:00:58 AM, you wrote:
*Main toList ht
[(miguel,3),(michael,2),(mike,1)]
It seems my dummy function is being ignored.
i wonder why you think so?
your ht has all 3 pairs you ever inserted
inside, they all are inside the same bucket since hash
Hi Bulat,
I was just looking for a simple hashing function. I was going to use the length
function but a constant int is even simpler. I'm supposing that had I used the
length function mike and fred would end up in the same bucket.
This is the first time I've tried to do anything in Haskell
Using the same basic structure you did, and foldr, I think below is the
simplest method:
import Data.Maybe
searchList :: (a - Bool) - [a] - Maybe [a]
searchList p xs = foldr (\x acc - if p x then Just (x: fromMaybe [] acc)
else acc) Nothing xs
ghci
On 2009-11-15, Michael Mossey m...@alumni.caltech.edu wrote:
I will need a function that computes prime (normal?)
form, of course, and it is just begging to be
memoized.
there are some prime form algorithms at
I have some mildly complicated parsing code, that uses parsec to return
a computation (in a state monad) that handles operator precedence - so I
can handle scoped precedence/fixities, much like in Haskell. I just
spent a while bolting on some new features. More time than I'd like, I'd
left it
It's very hard to tell what is going on without more details. If you
*at least* give the ghci session, and possibly the whole code (while
it might be too much to read, it is not to much to load and try
ourselves).
This looks like a monomorphism restriction, which shouldn't happen
when you are
On Tue, Nov 17, 2009 at 6:31 PM, Ezra Lalonde ezra.lalo...@gmail.com wrote:
Using the same basic structure you did, and foldr, I think below is the
simplest method:
import Data.Maybe
searchList :: (a - Bool) - [a] - Maybe [a]
searchList p xs = foldr (\x acc - if p x
On Tue, Nov 17, 2009 at 7:39 PM, David Menendez d...@zednenem.com wrote:
On Tue, Nov 17, 2009 at 6:31 PM, Ezra Lalonde ezra.lalo...@gmail.com wrote:
Using the same basic structure you did, and foldr, I think below is the
simplest method:
import Data.Maybe
searchList
Neil Brown wrote:
Having skimmed the page, it seems like the re-use of . is one of the
major difficulties of the proposal. Would it be possible to use -?
It has been used for accessing members in C and C++, so it is not too
unusual a choice.
It's also the one that Perl went with.
It is
Doug McIlroy wrote:
Is there a deep reason (beyond saving a sentence
or two in the language definition) for requiring
all patterns in a function binding to have the
same explicit arity?
Perhaps it is more likely that a clause omitting an argument is a
mistake by the programmer, than that it
At 11:00 AM + 11/17/09, Simon Marlow wrote:
I've just uploaded deepseq-1.0.0.0 to Hackage
http://hackage.haskell.org/package/deepseq
This provides a DeepSeq class with a deepseq method, equivalent to
the existing NFData/rnf in the parallel package. I'll be using this
in a newly
On Tue, Nov 17, 2009 at 8:48 PM, Dean Herington
heringtonla...@mindspring.com wrote:
The documentation claim that The default implementation of 'deepseq' is
simply 'seq' is not exactly right, as `deepseq` and `seq` have different
signatures. Which raises the more interesting question: Why did
The documentation claim that The default implementation of
'deepseq' is simply 'seq' is not exactly right, as `deepseq` and
`seq` have different signatures.
Yes indeed. In order to use deepseq, it looks like I also need some
way to force the () return value, e.g.
let res = deepseq
Simon, have you given any thought to how this interacts with type system
extensions, in particular with GADTs and type families? The proposal relies on
being able to find the type of a term but it's not entirely clear to me what
that means. Here is an example:
foo :: F Int - Int
foo :: Int -
On Tue, Nov 17, 2009 at 10:01 PM, Luke Palmer lrpal...@gmail.com wrote:
filter even [0..] -- [0,2,4,6,8,...]
searchList even [0...] -- Just [0,2,4,6,8,...]
searchList gives Nothing in exactly those cases that filter gives [].
They give _|_ in exactly the same situations. searchList
There is the property that once you 'move across the = to the right', the
pattern matcher isn't allowed to backtrack and try other patterns any more,
which might introduce some funny business. Though, I can't -- at the moment
-- come up with a way that it would break anything.
-Edward Kmett
On
Anyone else seeing a bunch of linker errors when trying to install
HipmunkPlayground?
this is what i see:
C:\Program
Files\Haskell\OpenGL-2.2.3.0\ghc-6.10.4/libHSOpenGL-2.2.3.0.a(RenderMode.o):fake:(.text+0x5be):
more undefined references to `glRenderMode' follow
C:\Program
On Tue, Nov 17, 2009 at 10:21:07PM -0800, Anatoly Yakovenko wrote:
Anyone else seeing a bunch of linker errors when trying to install
HipmunkPlayground?
Hmmm, no, I've never seen those errors before. Are you able to
compile any OpenGL programs at all? You may try, for example,
installing the
56 matches
Mail list logo