On Tue, Dec 1, 2009 at 2:24 AM, Lee Pike wrote:
> Tom,
>
> I have a (hopefully) easy question about timing and Atom in the use-case
> where you're handling all your own scheduling without relying on a RTOS
> (where you get preemption). Suppose I want a rule to fire every 2ms.
> Naturally, I'd wa
Hello!
On Mon, Nov 23, 2009 at 12:29 PM, Antoine Latter wrote:
> On Sun, Nov 22, 2009 at 11:56 AM, Antoine Latter wrote:
>>
>> Running 'pandoc --strict' over the Markdown readme.text takes:
>>
>> ~0.09s with pandoc built against parsec-2
>> ~0.19s with pandoc built against parsec-3
>>
>> on my m
On Mon, Nov 30, 2009 at 03:02, Duncan Coutts
wrote:
> On Mon, 2009-11-30 at 06:08 +, Malcolm Wallace wrote:
>> However, if you really want to terminate the stream at
>> the first error, and to reflect this in the type, then I guess you can
>> define your own list type:
>>
>> data ListThenError
On Mon, Nov 30, 2009 at 8:36 PM, Hector Guilarte wrote:
> One time I needed to do use a random number in some places of a completly
> pure program so I made a infinite list of random numbers and passed it
> around all the time in the functions as they where called, using the head of
> the list I p
On Mon, Nov 30, 2009 at 6:22 AM, Michael Lesniak wrote:
> Hello,
>
> In terms of
>
> "to become a great programmer, you need to read great programs"[1]
>
> what are "great" programs written in Haskell (for your personal
> definition of great), which source code is freely available on hackage
> or
One time I needed to do use a random number in some places of a completly
pure program so I made a infinite list of random numbers and passed it
around all the time in the functions as they where called, using the head of
the list I passed to the function whenever I needed a random number and
retur
On Mon, 2009-11-30 at 09:22 +0100, Gour wrote:
> Do you have some public repo for the project's code?
I thought I mentioned this somewhere, but I've been using this git repo:
http://jayne.hortont.com/git/cgit.cgi/clutterhs.git/
___
Haskell-Cafe maili
Tom Tobin writes:
> On Nov 30, 2009, at 5:06 PM, Ivan Lazar Miljenovic wrote:
>> The "default" Hlint keybinding is C-c l:
>
> Doesn't that violate the emacs proscription against taking "C-c
> (letter)" bindings, as they are intended to be reserved for the user?
Well, the Emacs integration that c
> This doesnt. But why?
Back to the definition of function composition: f . g is possible if g
returns a value that's compatible with f's argument. Now, let's check the
type of square and add3:
square :: Num a => a -> a
add3 :: Num a => a -> a -> a -> a
(square . add3 1 2) is actually seen by t
On Nov 30, 2009, at 5:06 PM, Ivan Lazar Miljenovic wrote:
> The "default" Hlint keybinding is C-c l:
Doesn't that violate the emacs proscription against taking "C-c (letter)"
bindings, as they are intended to be reserved for the user?
From the GNU Emacs manual:
"Don't define C-c letter as a key
> > Still more importantly to me, I understand that anyhow if I intend
> > to use IO or random numbers, I must design my strategy from the
> > beginning as "encapsulated in a monad". Something like:
> >
> > class (Monad m) => Strategy m a where ...
> >
> That's not true at all, you can always p
Eric Dedieu escribió:
> Still more importantly to me, I understand that anyhow if I intend to
> use IO or random numbers, I must design my strategy from the beginning
> as "encapsulated in a monad". Something like:
>
> class (Monad m) => Strategy m a where ...
>
That's not true at all, you can
Svein Ove Aas writes:
> * New command: M-x haskell-check, calls (by default) hlint on the
> current file. Also bound to C-c C-v.
I've got two potential problems with this:
* For package maintenance purposes, the default inclusion of hlint could
cause some problems (for starters, in Gentoo ha
> * fill-paragraph (M-q) now only affects comments, and correctly
> handles Haddock commentary. adaptive-fill-mode is turned off, as it
> was interfering.
This is awesome. I have to retrain my fingers not to fear M-q anymore.
___
Haskell-Cafe mailing li
I would suspect that the IO Monad is to unsafe, maybe a more stringent
monad would be more appropriate.
--
Regards,
Casey
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
newbie2009 wrote:
>
> I am a newbie. Consider this code:
>
> square x = x * x
> add3 x y z = x + y + z
> add x y = x + y
> composition5 x = (square . add3) x
> composition6 x y = (square . add3) x y
>
> 1) What arguments can i pass to composition5? Please give an example of
> calling it.
> 2
> There's a nice approach to this problem which is described
> and implemented in the MonadPrompt package[1].
Thanks a lot for this link. The "guessing game" example linked to from
the documentation is still very hard to understand (I'm still struggling
with monads), but it seems to fill my needs.
On Mon, Nov 30, 2009 at 04:14:03PM -0500, Sean McLaughlin wrote:
> Is there a way to make haddock not generate instance documentation
> for non-exported types? Right now for instance, if there is a class A
> in module A, and I have a hidden type B in module B and I have
> instance A.A B in modul
Hi.
I believe I'm using parsec 3.0.1, although I already fixed the imports (even
thou they were working).
Thanks for the references, specially the parsec User Guide - it saved my
life, in 30 minutes I actually *understood* my mistake and fixed it. Now my
code and it compiles and makes sense, even
Hi,
Is there a way to make haddock not generate instance documentation
for non-exported types? Right now for instance, if there is a class A
in module A, and I have a hidden type B in module B and I have
instance A.A B in module B, then in the documentation for module A,
the (supposedly hidden)
Excerpts from Jose Iborra's message of Sun Nov 29 10:41:50 -0500 2009:
> There is indeed an Monad instance for Either in mtl,
> declared in the module Control.Monad.Error.
> I can't explain why your compiler cannot find it.
> Can you paste a blurb of code somewhere?
{-# LANGUAGE PackageImports
* Don Stewart [2009-11-30 13:01:11-0800]
> mlesniak:
> > Hello,
> >
> > In terms of
> >
> > "to become a great programmer, you need to read great programs"[1]
> >
> > what are "great" programs written in Haskell (for your personal
> > definition of great), which source code is freely availabl
Ok,
I used this advice:
http://www.haskell.org/haskellwiki/GHC/Using_the_FFI#Importing_C_functions_that_turn_out_to_be_CPP_macros
to make 'xmlFree' callable from Haskell.
I was completly wrong in my first post...
I do apologize.
On Sun, Nov 29, 2009 at 8:56 PM, El Barto wrote:
> Thanks for your
mlesniak:
> Hello,
>
> In terms of
>
> "to become a great programmer, you need to read great programs"[1]
>
> what are "great" programs written in Haskell (for your personal
> definition of great), which source code is freely available on hackage
> or somewhere else on the net?
>
> I'm person
On Mon, Nov 30, 2009 at 5:22 AM, Michael Lesniak wrote:
> Hello,
>
> In terms of
>
> "to become a great programmer, you need to read great programs"[1]
>
> what are "great" programs written in Haskell (for your personal
> definition of great), which source code is freely available on hackage
> or
Hi Fernando. I tried this approach for a toy language as well, and I
was unhappy with it.
I have found that, with Parsec, it is best to *not* split your parsing
completely into "tokenization" and "parsing" phases, but rather to
interleave them. Instead of
> tokenize :: Parser [MJVal]
make
> t
Am Montag 30 November 2009 20:01:04 schrieb michael rice:
> Hi all,
>
> A lot of things posted here I wasn't aware of. My original example involved
> ~(x,y), so, returning to that context, how would these two simple cases
> vary:
>
> add2 :: (Int,Int) -> Int
> add2 (x,y) = x+y
>
> add2 :: (Int,Int)
Consider these two functions:
z = ([], [])
alt1 = foldr f z where
f a (x,y) = (a:y, x)
alt2 = foldr g z where
g a ~(x,y) = (a:y, x)
alt1 (1:2:3:undefined)
= foldr f z (1:2:3:undefined)
= f 1 (foldr f z (2:3:undefined))
-- Now f 1 needs to evaluate its second argument for the pattern mat
On Mon, Nov 30, 2009 at 2:01 PM, michael rice wrote:
>
> Hi all,
>
> A lot of things posted here I wasn't aware of. My original example involved
> ~(x,y), so,
> returning to that context, how would these two simple cases vary:
>
> add2 :: (Int,Int) -> Int
> add2 (x,y) = x+y
>
> add2 :: (Int,Int)
I have been looking at the Cabal roadmap (tickets marked for
bottom) and notice that no one has mentioned multi-versioning
or compatibility classes. Maybe these are bad ideas?
Multi-versioning seems highly desirable. Essentially, it
allows us to have the same qualified names be provided
Hi all,
A lot of things posted here I wasn't aware of. My original example involved
~(x,y), so, returning to that context, how would these two simple cases vary:
add2 :: (Int,Int) -> Int
add2 (x,y) = x+y
add2 :: (Int,Int) -> Int
add2 ~(x,y) = x+y
I guess what I'm looking for is the concept tha
Am Montag 30 November 2009 19:32:01 schrieb Brandon S. Allbery KF8NH:
> On Nov 30, 2009, at 13:26 , michael rice wrote:
> > So, ALL patterns are strict, unless one precedes them with "~"?
>
> "case" patterns are strict (this includes pattern matching in function
> arguments).
> "let" patterns are l
Am Montag 30 November 2009 19:26:13 schrieb michael rice:
> So, ALL patterns are strict, unless one precedes them with "~"?
Or they appear in a let-binding:
Prelude> let f xs = let (x:y:zs) = xs in True
Prelude> f []
True
>
> Michael
___
Haskell-Cafe
On Nov 30, 2009, at 13:26 , michael rice wrote:
So, ALL patterns are strict, unless one precedes them with "~"?
"case" patterns are strict (this includes pattern matching in function
arguments).
"let" patterns are lazy.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8
So, ALL patterns are strict, unless one precedes them with "~"?
Michael
--- On Mon, 11/30/09, Brandon S. Allbery KF8NH wrote:
From: Brandon S. Allbery KF8NH
Subject: Re: [Haskell-cafe] Mystery operator?
To: "michael rice"
Cc: "Brandon S. Allbery KF8NH" , haskell-cafe@haskell.org
Date: Monday,
On Nov 30, 2009, at 12:47 , michael rice wrote:
From: http://www.haskell.org/haskellwiki/Blow_your_mind#Polynomials
-- splitting in two (alternating)
-- "1234567" -> ("1357", "246")
-- the lazy match with ~ is necessary for efficiency, especially
enabling processing of infinite lists
On Mon, Nov 30, 2009 at 6:27 PM, Ozgur Akgun wrote:
> Nice idea, but this way you still need to modify the single module which
> glues them alltogether.
> I wanted to allow the users of the module add some functionality to the
> module itself.
I don't think that is possible.
But a user could eas
michael rice wrote:
> From: http://www.haskell.org/haskellwiki/Blow_your_mind#Polynomials
>
> -- splitting in two (alternating)
> -- "1234567" -> ("1357", "246")
> -- the lazy match with ~ is necessary for efficiency, especially enabling
> processing of infinite lists
> foldr (\a ~(x,y) -
From: http://www.haskell.org/haskellwiki/Blow_your_mind#Polynomials
-- splitting in two (alternating)
-- "1234567" -> ("1357", "246")
-- the lazy match with ~ is necessary for efficiency, especially enabling
processing of infinite lists
foldr (\a ~(x,y) -> (a:y,x)) ([],[])
This works but
> From: Bas van Dijk
>
> On Mon, Nov 30, 2009 at 6:22 AM, John Millikin wrote:
>> ...I've considered two possible error handling modes...
>
> Regarding parsing, there's a third option: iteratees[1]. See [2] for a
> motivation and description of iteratees.
>
I think it's interesting to note that
Nice idea, but this way you still need to modify the single module which
glues them alltogether.
I wanted to allow the users of the module add some functionality to the
module itself.
Thanks for the perspective though,
-- Ozgur
2009/11/30 Roel van Dijk
> On Mon, Nov 30, 2009 at 5:15 PM, Ozgur
On Mon, Nov 30, 2009 at 5:15 PM, Ozgur Akgun wrote:
> Is there a way of splitting the definition of a module into multiple files?
Let's say you have some module A which introduces 3 symbols:
module A (a, b, c) where
a = 1
b = 2
c = 3
Now we will split it in 3 modules:
module B ( b ) where
b =
Hi Fernando
Which version of Parsec are you using, the one that ships with GHC or Parsec 3?
I would imagine whichever you one you are using you have the imports
wrong for these modules:
import Text.Parsec.Pos
import Text.Parsec.Prim
should be ...
import Text.ParserCombinators.Parsec.Pos
import
Dear Cafe,
Is there a way of splitting the definition of a module into multiple files?
Cheers,
--
Ozgur Akgun
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I earlier posted to this list asking for help in getting Cabal to play with a
Fortran compiler. When it turned out that there was no answer to this, I of
course did the obvious thing --- I wrote my own build system. :-)
It already boasts the following features:
* Fully self-hosting --
Haskell-mode, a major mode for writing Haskell code in Emacs, has been
updated to version 2.7.0.
This release contains mostly bugfixes, but also adds support for hlint
highlighting via flymake.
Additionally, haskell-mode now has a bug-tracker and mailing list.
Mailing list:
http://projects.haske
On Mon, 2009-11-30 at 13:36 +0100, Bas van Dijk wrote:
> On Mon, Nov 30, 2009 at 11:35 AM, Duncan Coutts
> wrote:
> > Ah but flags are not allowed to change the public exported API of a
> > library.
>
> I wasn't aware of this. Where is this documented?
Hmm, I'm not sure it is actually. It should
Hello again.
First, I'd like to thank you both for your help. You gave me nice tips and
nice material.
However, I think there is something I'm missing here. I've coded most of the
parser, and I have a feeling I'm doing some great mistake. Not only my code
won't compile, I don't know how to deal w
I'm pleased to announce the latest version of my Haskell bindings to the
Graphviz [1] suite of tools for visualising graphs. As usual, it is
available from Hackage [2].
[1] http://graphviz.org/
[2] http://hackage.haskell.org/package/graphviz
Changes in this release include:
* Updated and extend
On Mon, Nov 30, 2009 at 11:35 AM, Duncan Coutts
wrote:
> Ah but flags are not allowed to change the public exported API of a
> library.
I wasn't aware of this. Where is this documented?
The reason I ask is because I have a small package on hackage that
violates this:
http://hackage.haskell.org/
On Mon, Nov 30, 2009 at 6:22 AM, John Millikin wrote:
> ...I've considered two possible error handling modes...
Regarding parsing, there's a third option: iteratees[1]. See [2] for a
motivation and description of iteratees.
regards,
Bas
[1] http://hackage.haskell.org/package/iteratee
[2] http:
Hello,
In terms of
"to become a great programmer, you need to read great programs"[1]
what are "great" programs written in Haskell (for your personal
definition of great), which source code is freely available on hackage
or somewhere else on the net?
I'm personally also interested in your def
i don't think that "reproducing in its entirety" is more permissive
for his purpose :)
I think translating to F# counts as modification, so the other clause
of the license applies; namely you can do anything you like with it,
provided you do not claim it defines Haskell'98.
Regards,
Ma
Hello Malcolm,
Monday, November 30, 2009, 1:45:29 PM, you wrote:
> And in fact the official Haskell'98 libraries are covered by an even
> more permissive license: that of the Language Report.
> "The authors intend this Report to belong to the entire Haskell
> community, and so we grant permiss
On Mon, 2009-11-30 at 09:43 +0100, jean-christophe mincke wrote:
> Hello,
>
> I am writing a port to F# of some haskell standard libraries.
>
> I would like to publish them under an open source license and mention
> the origin of the initial code.
>
> www.haskell.org is under the simple permiss
On Mon, 2009-11-30 at 06:08 +, Malcolm Wallace wrote:
> However, if you really want to terminate the stream at
> the first error, and to reflect this in the type, then I guess you can
> define your own list type:
>
> data ListThenError e a = Cons a (ListThenError e a)
>
www.haskell.org is under the simple permissive license. Does this
license also cover the souce code available from that site?
the license cover only Wiki contents. std haskell libraries covered
by BSD3
license, for example as a part of bsd3-covered GHC distribution
And in fact the official
On Sun, 2009-11-29 at 19:38 -0800, Alexander Dunlap wrote:
> > Then the other bit you suggested foomonad >= 4.0 && < 4.1 && HAS_MTL
> > would be needed to be able to express that you want a package that has
> > been built with a particular optional instance provided. This is the bit
> > that canno
Hello jean-christophe,
Monday, November 30, 2009, 11:43:00 AM, you wrote:
> I am writing a port to F# of some haskell standard libraries.
> www.haskell.org is under the simple permissive license. Does this
> license also cover the souce code available from that site?
the license cover only Wik
Hello,
I am writing a port to F# of some haskell standard libraries.
I would like to publish them under an open source license and mention the
origin of the initial code.
www.haskell.org is under the simple permissive license. Does this license
also cover the souce code available from that site
On Sun, 29 Nov 2009 10:54:01 -0500
>> "Matt" == Matt Arsenault wrote:
Matt> Right now I'm working on finishing Clutter, Clutter-gtk, and COGL.
Great.
I believe Clutterhs can make Haskell development for Moblin quite
interesting (& possible). :-)
Now I need to pull gtk2hs sources 'cause la
61 matches
Mail list logo