I feel that the haskell mailing lists must have the reply-to field set, so that
a person can reply to the list by just clicking reply.
I am unsure if I am the only one facing this problem.
---
Ashok `ScriptDevil` Gautham
___
Haskell-Cafe mailing list
Ha
On Tue, May 5, 2009 at 11:07 PM, Rouan van Dalen wrote:
>
> Hi everyone.
>
> I am designing my own programming language.
>
> I would like to know what is the best way to go about writing my compiler in
> haskell.
> What are the tools available in haskell that can help with compiler
> constructio
Hello Rouan
My bible : The dragon book of Aho, Sethi & Ullman
http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools
Regards
J-C
On Wed, May 6, 2009 at 8:07 AM, Rouan van Dalen wrote:
>
> Hi everyone.
>
> I am designing my own programming language.
>
> I would like to know
On Wed, May 6, 2009 at 12:07 AM, Rouan van Dalen wrote:
>
> Hi everyone.
>
> I am designing my own programming language.
>
> I would like to know what is the best way to go about writing my compiler
> in haskell.
> What are the tools available in haskell that can help with compiler
> construction?
2009/5/6 Rouan van Dalen :
>
> Hi everyone.
>
> I am designing my own programming language.
>
> I would like to know what is the best way to go about writing my compiler in
> haskell.
> What are the tools available in haskell that can help with compiler
> construction?
>
> I know about Happy. Is
Hi everyone.
I am designing my own programming language.
I would like to know what is the best way to go about writing my compiler in
haskell.
What are the tools available in haskell that can help with compiler
construction?
I know about Happy. Is that a good tool to use?
The compiler is in
We're pleased to announce the first release of the Haskell Platform:
a single, standard Haskell distribution for every system.
Download the Haskell Platform 2009.2.0 installers and specification:
http://hackage.haskell.org/platform/
The Haskell Platform is a blessed library and tool suite f
"Vasili I. Galchin" writes:
> Hello,
>
> I have forgotten the runhaskell CLI parameters ... sigh. In particular I
> want to a "local" build of a set of of package:
>
> runhaskell Setup.hs configure --user???
>
> I just did a "runhaskell -?" which didn't tell me a lot!
Try runhaskel
On May 5, 2009, at 23:39 , Vasili I. Galchin wrote:
I have forgotten the runhaskell CLI parameters ... sigh. In
particular I want to a "local" build of a set of of package:
runhaskell Setup.hs configure --user???
That's not an option to runhaskell, but an option to Setup.hs.
Hello,
I have forgotten the runhaskell CLI parameters ... sigh. In particular
I want to a "local" build of a set of of package:
runhaskell Setup.hs configure --user???
I just did a "runhaskell -?" which didn't tell me a lot!
Kind regards,
Vasili
__
On May 5, 2009, at 04:52 , br...@lorf.org wrote:
I have a long-lived multithreaded server process that needs to execute
programs and interact with them via Handles. The programs could
misbehave, like loop or hang, so I need to limit the real and CPU time
they can take.
I guess System.Posix.Resou
Chris Forno (jekor) wrote:
The idea is that I spent years studying different languages, generally
with a textbook. The textbooks tend to focus on teaching rules and
grammar, with a little bit of vocabulary and dialog each chapter. I
think the focus should be reversed.
This varies wildly by text
On 6 May 2009, at 4:49 am, Nico Rolle wrote:
Hi everyone.
I have a problem.
A function is recieving a lambda expression like this:
(\ x y -> x > y)
or like this
(\ x y z a -> (x > y) && (z < a)
Your first function has type
Ord a => a -> a -> Bool
so your list of parameters must have
2009/5/6 Bulat Ziganshin :
Hello applebiz89,
Tuesday, May 5, 2009, 7:20:35 PM, you wrote:
filmsInGivenYear :: Int -> [Film] -> [String]
filmsInGivenYear filmYear ?= [ title | year <- (Film title director year
fans) , year == filmYear] (this code wont compile - error given '?Syntax
error in e
ok:
> On 5 May 2009, at 8:30 pm, Magnus Therning wrote:
>
>> On Tue, May 5, 2009 at 1:04 AM, Richard O'Keefe
>> wrote:
>>> I never really understood why it was thought to be relevant,
>>> but I was challenged to show that n+k patterns occurred in
>>> Hackage.
>>
>> Why is it relevant?
>
> Some p
On 5 May 2009, at 8:30 pm, Magnus Therning wrote:
On Tue, May 5, 2009 at 1:04 AM, Richard O'Keefe
wrote:
I never really understood why it was thought to be relevant,
but I was challenged to show that n+k patterns occurred in
Hackage.
Why is it relevant?
Some people think that the popular
On May 4, 2009, at 06:19 , Paolo Losi wrote:
http://www.nabble.com/-scala--usefulness-of-OOP-td23268250.html
Martin Odersky, scala creator, advocates the use of OOP using
an interesting toy problem.
I would be very interested about the haskell point of view on the
topic.
Is there any haskell
> half-assed state
for a real state solution, there's follow up here:
http://groups.google.com/group/haskell-cafe/browse_thread/thread/d6143504c0e80075
2009/5/5 Thomas Hartman :
>> interact (\s -> let (first,second) = span (not . null) (lines s)
> in unlines ("first":first++"second
Guenther Schmidt wrote:
> let me first of all thank you for providing the HDBC package. Haskell
> would be a much, much less usefull language without a working database
> interface. I could certainly not have written the app in Haskell
> without it and in any other language I know writing this
I pushed out a new version of atom that incorporates some of John's
recommendations (thanks John). And it ships with a slightly better
example.
The release also includes means to extract code coverage to track
which atom rules have fired during testing.
-Tom
http://hackage.haskell.org/cgi-bin/h
On Tue, May 5, 2009 at 3:27 PM, Luke Palmer wrote:
> On Sun, May 3, 2009 at 11:27 AM, Tobias Olausson wrote:
>
>> Hello!
>> I have a program that is using ST.Strict, which works fine.
>> However, the program needs to be extended, and to do that,
>> lazy evaluation is needed. As a result of that,
On Sun, May 3, 2009 at 11:27 AM, Tobias Olausson wrote:
> Hello!
> I have a program that is using ST.Strict, which works fine.
> However, the program needs to be extended, and to do that,
> lazy evaluation is needed. As a result of that, I have switched
> to ST.Lazy to be able to do stuff like
2009/5/5 Andrew Coppin :
> Magnus Therning wrote:
>>
>> Andrew Coppin wrote:
>>>
>>> Stuff like "how many times does this function get called? How what's the
>>> maximum depth it recurses to?" That kind of thing.
>>
>> It won't help you, but wouldn't it be the kind of thing that'd fit in the
>> GHC
Am Dienstag 05 Mai 2009 21:42:00 schrieb Tobias Olausson:
> This simple implementation of CPU does not behave as expected in the
> latest version of ghc using ST.Lazy since it updates the `pc` in the
> wrong order.
> When we use ghc-6.8 the code works as expected both with lazy and strict
> ST. Ho
Magnus Therning wrote:
Andrew Coppin wrote:
Stuff like "how many times does this function get called? How what's
the maximum depth it recurses to?" That kind of thing.
It won't help you, but wouldn't it be the kind of thing that'd fit in
the GHC runtime?
Do you also require that the counter
This simple implementation of CPU does not behave as expected in the
latest version of ghc using ST.Lazy since it updates the `pc` in the
wrong order.
When we use ghc-6.8 the code works as expected both with lazy and strict ST.
How is that? How do we fix this so we can use ghc-6.10.
-- --
Aha!
There is in fact a way to fit this specification into the applicative paradigm.
I'm a bit muzzy as to what it all means, but I must say, aesthetically
I'm rather pleased with the result:
module Main where
import Control.Monad.State
import Control.Applicative
import Control.Applicative.Stat
Nico Rolle writes:
> A function is recieving a lambda expression like this:
> (\ x y -> x > y)
> or like this
> (\ x y z a -> (x > y) && (z < a)
And the type of that function is..?
> my problem is now i know i have a list filled with the parameters for
> the lambda expression. but how can i c
On Tue, May 5, 2009 at 10:05 AM, Nico Rolle wrote:
> I dont't understand why u ask me that but the lambda expression will
> only get values not functions as a parameter.
> a = 1
> b = 2
> c = 3
>
>>> What if I call
>>> a (+)?
>
> this won't happen in my use case.
> regards nico
Here's an example
> interact (\s -> let (first,second) = span (not . null) (lines s)
in unlines ("first":first++"second":takeWhile (not.null) second))
So, that didn't quite do the right thing, and it seemed like using
span/break wouldn't scale well for more than two iterations. Here's
another attempt
Am Dienstag 05 Mai 2009 17:38:35 schrieb mwin...@brocku.ca:
> Thanks, but I want a nice solution not another, even more complicated,
> workaround.
I'm afraid you're out of luck there.
Parsec carries a ParseError around even for successful parses (where it's a
SourcePos and
and empty list of mes
This is a Hard Problem in Haskell.
Let me ask you, how many parameters does this function take?
a = (\x -> x)
How many parameters does this function take?
b = (\f x -> f x)
How many parameters does this function take?
c = (\f x y -> f x y)
What if I call
a (+)?
-- ryan
On Tue, May 5, 2009 a
Short answer: that's impossible.
Well, with some oleging it should be possible, but the very fact that
you're trying to do something like this indicates that you're doing
something wrong. Where did this list of parameters came from? May be,
you can apply your function to them one at a time,
Hi everyone.
I have a problem.
A function is recieving a lambda expression like this:
(\ x y -> x > y)
or like this
(\ x y z a -> (x > y) && (z < a)
my problem is now i know i have a list filled with the parameters for
the lambda expression.
but how can i call that expression?
[parameters] is my
Hello,
While occasionally and slowly updating the future version of regex-tdfa I
found a bug that exists in the released 1.1.1 version. It was just a matter of
passing the wrong value into a function, so was easy to fix when I figured it
out.
The test case triggered an impossible "error" ca
Hello Wolfgang,
Tuesday, May 5, 2009, 8:27:17 PM, you wrote:
>> i know two problems in Haskell/GHC that require OO-loke features -
>> extensible exceptions and GUI widget types hierarchy
> Note that you don’t need different types for different kinds of GUI widgets if
> you use Functional Reactiv
Am Montag, 4. Mai 2009 13:35 schrieb Bulat Ziganshin:
> Hello Paolo,
>
> Monday, May 4, 2009, 2:05:44 PM, you wrote:
> > Martin Odersky advocates the OO features of the scala language
> > proposing an interesting problem where the OO approach seams
> > valuable.
>
> i know two problems in Haskell/G
On Mon, May 4, 2009 at 5:23 PM, John Van Enk wrote:
> Which package?
In 1251 packages, I found 20 source files out of 15144 source files
that use (n+k) patterns:
queuelike-1.0.9/Data/Queue/Stack.hs
queuelike-1.0.9/Data/Queue/TrieQueue.hs
hinze-streams-1.0/Data/Stream/Hinze/Stream.hs
compression-
On Tue, May 5, 2009 at 1:30 AM, Magnus Therning wrote:
> On Tue, May 5, 2009 at 1:04 AM, Richard O'Keefe wrote:
>> I never really understood why it was thought to be relevant,
>> but I was challenged to show that n+k patterns occurred in
>> Hackage.
>
> Why is it relevant?
Showing that they occu
On Tue, May 05, 2009 at 05:36:12PM +0200, Tillmann Rendel wrote:
>
> PS. I'm not a native speaker, but shouldn't it be "movies" and not "films"?
Both are correct. =)
-Brent
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/ma
Thanks, but I want a nice solution not another, even more complicated,
workaround.
On 5 May 2009 at 17:10, Martijn van Steenbergen wrote:
> mwin...@brocku.ca wrote:
> > Hi,
> >
> > I am using parsec to parse a small programming language. The language is
> > typed and
> > I need to do some type
Hi,
applebiz89 wrote:
> Hi, I think I need to use a list comprehension
There is no need to use list comprehensions, there is always a way to
express the same thing without them. In fact, list comprehensions are
defined as syntactic shorthands for this other way.
filmsInGivenYear :: Int -> [
2009/5/5 applebiz89 :
>
> Hi, I think I need to use a list comprehension for this function but Im not
> good with list comprehension. this is what I have so at the moment?
>
> filmsInGivenYear :: Int -> [Film] -> [String]
> filmsInGivenYear filmYear ?= [ title | year <- (Film title director year
>
Hello applebiz89,
Tuesday, May 5, 2009, 7:20:35 PM, you wrote:
> filmsInGivenYear :: Int -> [Film] -> [String]
> filmsInGivenYear filmYear ?= [ title | year <- (Film title director year
> fans) , year == filmYear] (this code wont compile - error given '?Syntax
> error in expression (unexpected `;
Hi, I think I need to use a list comprehension for this function but Im not
good with list comprehension. this is what I have so at the moment?
filmsInGivenYear :: Int -> [Film] -> [String]
filmsInGivenYear filmYear ?= [ title | year <- (Film title director year
fans) , year == filmYear] (this co
mwin...@brocku.ca wrote:
Hi,
I am using parsec to parse a small programming language. The language is typed
and
I need to do some type checking, too. I have decided to do the parsing and type
checking
simultaneously in the my parsec parser. This approach avoids to keep source
code positions
i
Hi,
When we needed to do something similar with Parsec, we chose to pack the
relevant source position into the error string (you can just use
Show/Read, plus a special sequence of characters to indicate where the
position ends and the real error starts). We then unpack it outside
runParser b
Hi,
I am using parsec to parse a small programming language. The language is typed
and
I need to do some type checking, too. I have decided to do the parsing and type
checking
simultaneously in the my parsec parser. This approach avoids to keep source
code positions
in the data type in order to
seems to be the same behavior whether in ghci or compiled with ghc.
2009/5/5 Ketil Malde :
> Thomas Hartman writes:
>
>> That's slick, but is there some way to use interact twice in the same
>> program?
>
> No :-)
>
>> t10 =
>> let f = unlines . takeWhile (not . blank) . lines
>> in do putS
I also tried
t15 =
let grabby = unlines . takeWhile (not . blank) . lines
top = ("first time: " ++) . grabby . ("second time: " ++) .
grabby
in interact top
but that didn't work either:
thart...@ubuntu:~/haskell-learning/lazy-n-strict>runghc sequencing.hs
a
first time: second time:
Thomas Hartman writes:
> That's slick, but is there some way to use interact twice in the same program?
No :-)
> t10 =
> let f = unlines . takeWhile (not . blank) . lines
> in do putStrLn "first time"
> interact f
> putStrLn "second time"
> interact f
>
> this re
That's slick, but is there some way to use interact twice in the same program?
t10 =
let f = unlines . takeWhile (not . blank) . lines
in do putStrLn "first time"
interact f
putStrLn "second time"
interact f
this results in *** Exception: : hGetContents: illegal
op
Chris Forno (jekor) wrote:
The idea is that I spent years studying different languages, generally
with a textbook. The textbooks tend to focus on teaching rules and
grammar, with a little bit of vocabulary and dialog each chapter. I
think the focus should be reversed.
I think it largely depends
Hello z_axis,
Tuesday, May 5, 2009, 1:27:16 PM, you wrote:
> floatLocation :: Window -> X (ScreenId, W.RationalRect)
>
> rr <- snd `fmap` floatLocation w
>
> class Functor f where fmap :: (a -> b) -> f a -> f b
looks ok. X===f, fmap executes
floatLocation w :: X (ScreenId, W.RationalRect) ===
2009/5/5 z_axis :
> The following code snippets is from xmonad:
> -- Given a window, find the screen it is located on, and compute
> -- the geometry of that window wrt. that screen.
> floatLocation :: Window -> X (ScreenId, W.RationalRect)
> --...
> rr <- snd `fmap` floatLocation w
>
> Prelude>
On 5 May 2009, at 11:27, z_axis wrote:
The following code snippets is from xmonad:
-- Given a window, find the screen it is located on, and compute
-- the geometry of that window wrt. that screen.
floatLocation :: Window -> X (ScreenId, W.RationalRect)
--...
rr <- snd `fmap` floatLocation w
The following code snippets is from xmonad:
-- Given a window, find the screen it is located on, and compute
-- the geometry of that window wrt. that screen.
floatLocation :: Window -> X (ScreenId, W.RationalRect)
--...
rr <- snd `fmap` floatLocation w
Prelude> :i fmap
class Functor f where fm
I have a long-lived multithreaded server process that needs to execute
programs and interact with them via Handles. The programs could
misbehave, like loop or hang, so I need to limit the real and CPU time
they can take.
I guess System.Posix.Resource.setResourceLimit sets limits on the
current pro
On Tue, May 5, 2009 at 1:04 AM, Richard O'Keefe wrote:
> I never really understood why it was thought to be relevant,
> but I was challenged to show that n+k patterns occurred in
> Hackage.
Why is it relevant?
/M
--
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.o
On 4 May 2009, at 23:15, Thomas Hartman wrote:
{-# LANGUAGE NoMonomorphismRestriction #-}
import Data.List
import Control.Monad
import Control.Applicative
-- Can the function below be tweaked to quit on blank input,
provisioned in the applicative style?
-- which function(s) needs to be rewritt
On Mon, May 4, 2009 at 11:49 PM, Conor McBride
wrote:
> Remember folks: Missiles need miffy!
Quote of the week !
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ryan Ingram writes:
> Something like this:
>
> -- Replaces "runStateT" for callbacks that might affect the state
> invert :: IORef s -> StateT s IO a -> IO a
> invert r m = do
> s <- readIORef r
> (a, s') <- runStateT m s
> writeIORef r s'
> return a
>
> -- Replaces "liftIO" when
62 matches
Mail list logo