Hello,
I wish to use a mutable array in multiple threads. Can IO arrays be
used in any thread, or only the thread they are created in? (So if I
create an IO array in one thread, pass it to another via an MVar, can
I read / edit it in that other thread?) Similarly about IORefs... can
they be
Have you tried it? Did you run in to any trouble?
Assuming you get locking correct there shouldn't be any trouble with this.
Take care,
Antoine
On Fri, Dec 31, 2010 at 4:19 AM, Eric Stansifer
eric.stansifer+hask...@gmail.com wrote:
Hello,
I wish to use a mutable array in multiple threads.
If you need multithreaded mutable arrays, TArray may be
a better choice, as the underlying stm implementation will manage locking
for you. (The current implementation isn't terribly efficient, but when
it gets better you'll get it for free too :-)
Hello everybody!
I am quite new to haskell programming. I am trying to make a gui for a
drumming project made in euterpea and I want to do something like this :
b - button f [text := Run! , on command := (test mambo_orig)]
test mambo_orig is executed from ghci but I want It to be able to
I tried a quick test with an IOArray, so I know that at least one time
it works. I don't know enough of the internals of IO and IOArray to
be able to extrapolate; there could be some race condition hidden
internally if IO is misused.
Thanks,
Eric
___
On Fri, 31 Dec 2010 12:32:06 +0100, Chionidis Ioannis
j...@echidna-band.com wrote:
Hello everybody!
I am quite new to haskell programming. I am trying to make a gui for a
drumming project made in euterpea and I want to do something like this :
b - button f [text := Run! , on command :=
I am trying to get a grammar where keywords are also valid identifiers.
Been messing round with the following Happy grammar :-
%token
'let' { TokenIdent let }
'in'{ TokenIdent in }
ident { TokenIdent $$ }
int { TokenInt $$ }
On Thursday, December 30, 2010 06:50:32 pm Neil Mitchell wrote:
Hi Sönke,
I've just released cmdargs-0.6.6 which supports helpArgs [groupname
Something]
That was fast! Thanks a lot, works like a charm.
Thanks,
Sönke
___
Haskell-Cafe mailing list
On 31 December 2010 13:21, Aaron Gray aaronngray.li...@gmail.com wrote:
I am trying to get a grammar where keywords are also valid identifiers.
Sorry working now !
Aaron
Been messing round with the following Happy grammar :-
%token
'let' { TokenIdent let }
'in'
L.S.,
I find, quite often, links to haskell.org/xxx pages that have disappeared;
isn't it possible to just copy all of these pages, to the original
location, before the old server disappears?
I used the W3C link checker[0] to check links from the GUI libraries
page[1]; the following
Hello,
I just noticed that the instances for this example look more readable when
written with two recently proposed Haskell extensions. Perhaps we should
consider implementing these in GHC?
Using chain instances: (http://web.cecs.pdx.edu/~mpj/pubs/instancechains.pdf
)
instance DeepFlat a b =
Will Ness wrote:
Heinrich Apfelmus writes:
Here an example where the VIP merge would give a different result
bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) :
error bad
We have
ghci bad
[1,2*** Exception: bad
but the VIP version would give
Will Ness wrote:
Heinrich Apfelmus writes:
Here an example where the VIP merge would give a different result
bad = tfold $ (1:10:undefined) : (2:3:5:undefined) : (4:undefined) :
error bad
We have
ghci bad
[1,2*** Exception: bad
but the VIP version would give
Welcome to issue 163 of the HWN, a newsletter covering developments in
the [1]Haskell community. This release of the newsletter contains some
summary data for the year 2010. Thanks to everyone involved for making
this such a wonderful community!
Big cheers to Miran Lipovaa, who got
Is there an easy Haskell function that gets the last Char of a [Char] or
String ?
Many thanks in advance,
Aaron
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-- untested and won't work on an infinite list
last :: [a] - a
last = head . reverse
-deech
On Fri, Dec 31, 2010 at 2:39 PM, Aaron Gray aaronngray.li...@gmail.com wrote:
Is there an easy Haskell function that gets the last Char of a [Char] or
String ?
Many thanks in advance,
Aaron
Sounds like you're looking for `last', which is in the Prelude.
http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Prelude.html#v%3Alast
Cheers,
-Matt
On Dec 31, 2010, at 3:39 PM, Aaron Gray wrote:
Is there an easy Haskell function that gets the last Char of a
[Char] or
http://haskell.org/hoogle/?hoogle=[Char]+-%3E+Char
last looks conspicuous :-)
On Fri, Dec 31, 2010 at 1:39 PM, Aaron Gray aaronngray.li...@gmail.com wrote:
Is there an easy Haskell function that gets the last Char of a [Char] or
String ?
Many thanks in advance,
Aaron
On 31 December 2010 20:44, Matthew Steele mdste...@alum.mit.edu wrote:
Sounds like you're looking for `last', which is in the Prelude.
Yep, feeling dumb I did not try it !
Thanks,
Aaron
http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Prelude.html#v%3Alast
Cheers,
I have attached a tiny parser and lexer.
This is really key to getting the lexing correct.
The only thing I could not get neatly was to disallow hyphens at the end of
identifiers, so have left it off until a good solution arrives.
I plan to move over to monads next.
Any comments welcome,
On Fri, Dec 31, 2010 at 6:43 PM, aditya siram aditya.si...@gmail.com wrote:
-- untested and won't work on an infinite list
last :: [a] - a
last = head . reverse
No definition for last works with infinite lists =).
Cheers,
--
Felipe.
___
Only the parser was attached.
On Fri, Dec 31, 2010 at 4:26 PM, Aaron Gray aaronngray.li...@gmail.com wrote:
I have attached a tiny parser and lexer.
This is really key to getting the lexing correct.
The only thing I could not get neatly was to disallow hyphens at the end of
identifiers, so
On 31 December 2010 21:26, Aaron Gray aaronngray.li...@gmail.com wrote:
I have attached a tiny parser and lexer.
This is really key to getting the lexing correct.
The only thing I could not get neatly was to disallow hyphens at the end of
identifiers, so have left it off until a good
23 matches
Mail list logo