On Mon, 2009-11-23 at 09:50 -0200, Maurício CA wrote:
I recently started porting cabal-install to Freebsd. When
I looked at its dependencies on hackage, I noticed HTTP
(=4000.0.2 4001). However the latest HTTP version on
hackage is 4000.0.8. That struck me as kinda odd. How can cabal
Does the following code increase the level of recursion
once for each input line or is the recursive construct
converted to an iteration?
Thanks,
Dave Feustel
main :: IO ()
main = do
line - getLine
processIt line
main
processIt :: String - IO ()
processIt s = do
print (length s
at the
conclusion of make;make install?
Thanks, Dave Feustel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
My apologies if this is a question with a trivial answer.
Command line args in C are accessed via argc and argv[]
defined as arguments to main();.
How are command line arguments to a ghc-compiled program
accessed in Haskell? Or is that even possible?
Thanks.
of a computer to do so. Plus I can write in
books :-). )
Thanks, Dave Feustel
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
SET!
Previous intel_span.c:210
Current: intel_batchbuffer.c:63
Can anyone suggest how to resolve this two functions which never
terminate but both share IORefs problem?
Many thanks,
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe
I recently did the classic push a shopping cart down the aisle at
Fry's to build a Core 2 Quad computer, with Linux swap and a soft
raid array spread across three 750 GB sata hard disks. I had some
potential first build issues, notably a mishap with the lawn of
copper grass that passes for a 775
If I recall correctly a rather neat way of exploiting this property of
qsort is exploited with Nested Data Parallelism and covered in this
talk:
http://www.londonhug.net/2007/05/25/video-of-spjs-talk-is-now-online/
Good food for thought :)
Dave,
On 18/09/2007, Thomas Girod [EMAIL PROTECTED
brands?
Finally, I'm confused why the unit type in the explicit type
expression at BArray's value constructor application doesn't foil the
branding, i.e. why it doesn't destroy the uniqueness/opaqueness of
's'?
Thanks for anyone who can explain this!
Dave
On 2007-03-04, [EMAIL PROTECTED], Feustel dfeustel@mindspring.com [EMAIL
PROTECTED] wrote:
The Makefile in the HSH distribution should do this for you. But you
can say:
ghc --make -o setup -package Cabal Setup.lhs
A40:/home/daf/Hsh/hsh}ghc --make -o setup -package Cabal Setu.lhs
On 2007-03-04, [EMAIL PROTECTED], Feustel dfeustel@mindspring.com
[EMAIL PROTECTED] wrote:
The Makefile in the HSH distribution should do this for you. But you
can say:
ghc --make -o setup -package Cabal Setup.lhs
A40:/home/daf/Hsh/hsh}ghc --make -o setup -package Cabal
make and make install of ghc 6.6 completed successfully,
but exe generated by ghc fails to load.
===test.hs===
main :: IO()
main = putStr This is a test\n
=
ghc test.hs
compilation IS NOT required
/usr/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
Is there a simple
think of is to use Template Haskell to read a
compressed tar file into a Haskell variable. Is that what one does, or
is there a better way?
Thanks in advance,
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
file command line tool written in Haskell and compiled
by GHC?
Thanks,
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
(This is a toy program to demonstrate only the part of my real program
that I'm having trouble with.)
Suppose I'm writing a program to print the current time in various
time zones. The time zones are to be given symbolically on the command
line in the form Europe/London or America/New_York. The
Hurrah, I am now calling the C function tzset() from my Haskell code
via FFI, and I'm getting the results I want.
$ cat hsc2now.hs
{-# LANGUAGE ForeignFunctionInterface #-}
import Data.Time
import Data.Time.LocalTime
import System.Environment
import System.Posix.Env
foreign import ccall time.h
they could send me? I'm also
looking to put together a page on haskellwiki once I'm up and running.
The project seems like a fine way to sneak Haskell into existing project ;)
Cheers,
Dave
(1) http://developers.facebook.com/thrift/
___
Haskell-Cafe mailing
was that by using ByteString and getting the whole file
into memory a small and linear increase would be seen for Map
overhead..
I have tried using both Data.ByteString.Char8 and
Data.ByteString.Lazy.Char8 with negligible difference.
For a hoot I tried it with String and yes, it's ridiculous :)
Cheers,
Dave
will have
no choice with time constraints :(
Dave,
On 10/03/2008, Dave Tapley [EMAIL PROTECTED] wrote:
Hi all,
I've been plugging away at this all day and some discussion in
#haskell has been fruitless. Perhaps you have the inspiration to see
what's happening!
Concerning this minimal
Hello,
I undertsand that this is Haskell cafe discussion forum. But I would highly
appreciate if anyone can tell me where can I get Compiler and editor for FLow
Caml ( it's a ML based language)) as I am not able to find it on net :(.
Thanks in Adavnce!
Akshay
There are 179 packages in the Web category on Hackage.
It am finding it difficult, as someone who is not familiar with any of
the Haskell web application frameworks on Hackage (and there seem to
be at least 9), to determine which are good quality, which do things I
would like a web framework to
Hi All,
I am stuck in converting the transition semantics in Haskell. Please let me
know how to define memory data types in Haskell( like we define pointer in C).
Prompt help would be greatly appreciated.
Sincerely,
Akshay
_
Hi All,
I am stuck in converting the transition semantics in Haskell. Please let me
know how to define memory data types in Haskell( like we define pointer in C).
Prompt help would be greatly appreciated.
Sincerely,
Akshay
_
Hi,
Thanks for your prompt reply. Actually I am trying to convert the following
transitive semantics to Haskell:
(Memory maps I to Z)
lookup m i = current value of i ( meaning lookup for I in memory m)
evB b m = true/(while b do c od;m) - (c; while b do c od;m)
I have written the boolean
Hi Luke,
Thanks for your prompt response. I'll try to implement the same for my
semantics!
Cheers!
Akshay
Date: Mon, 7 Sep 2009 00:12:14 -0600
Subject: Re: [Haskell-cafe] How to Create Data Type of memory
From: lrpal...@gmail.com
To: akshay.v.d...@hotmail.com
CC:
to make it useful and
productive. But I'd be keen to know if people have any anecdotes,
ideally ones which can subsequently be twisted into an argument for
Haskell ;)
Cheers,
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
Hi Colin
As an alternative you may consider using Thrift:
http://incubator.apache.org/thrift/
Cheers,
Dave
On Tue, 2008-11-11 at 16:45 +, Colin Paul Adams wrote:
Is there a way to call Haskell code from other languages? I have looked on
the wiki, and as far as I can see, it only talks
Arithmetic operators in haskell appear to require their operands to
have the same type. How can I do arithmetic between operands of
different types?
Alternatively, how do I coerce a value from being an Int to being a Double?
I am new to haskell. I have read a few tutorials but they do not
Is the full source of Yi suitable for building on non-linux platforms
(ie OpenBSD) (going to be) available?
Thanks,
Dave Feustel
http://RepublicBroadcasting.org - Because You CAN Handle The Truth!
___
Haskell-Cafe mailing list
Haskell-Cafe
I tried the code below with both ghc 6.2.2 and hugs march 2005.
ghc: The last statement in a 'do' construct must be an expression
Hugs ERROR interactive.hs - Can't find imported module System.Process
.
--
import
Talk about synchronicity! I was just wondering whether 'weaving' of
infinite lists is possible.
eg weave the infinite lists [2,4..], [3,6..], [5,10..]
to get [2,3,4,5,6,8,9,10,..]
Is this kind of lazy evaluation possible?
Thanks,
Dave Feustel
-Original Message-
From: Bas van Dijk
PROTECTED]
Sent: Apr 10, 2007 7:24 PM
To: Haskell-Cafe@haskell.org
Subject: Re: [Haskell-cafe] Weaving fun
This reminded me of interleaving as in:
Backtracking, Interleaving, and Terminating Monad Transformers
http://www.cs.rutgers.edu/~ccshan/logicprog/LogicT-icfp2005.pdf
On 4/10/07, Dave Feustel
-Original Message-
From: Mark T.B. Carroll [EMAIL PROTECTED]
Sent: Apr 11, 2007 10:18 AM
To: kynn [EMAIL PROTECTED]
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Why Perl is more learnable than Haskell
Sorry to hear of your struggles. There has been a lot of work lately on
StringLiteral ((char '\'') (manyTill anyChar (char
'\'')))
You might like:
http://syntaxfree.wordpress.com/2006/12/12/do-notation-considered-harmful/
Dave,
On 21/06/07, Tomasz Zielonka [EMAIL PROTECTED] wrote:
On Thu, Jun 21, 2007 at 03:34:54PM +0930, Levi Stephen wrote:
Is there a way through
Hi all,
I've been going over my code trying to get it all to compile with
ghc -Wall -Werror, without introducing constructs that would make
my code the laughing stock of the dynamic typing community. They
already think we're nuts; my daydreams are of a more computer
literate society
On Jun 22, 2007, at 11:42 AM, David Roundy wrote:
On Fri, Jun 22, 2007 at 11:37:15AM -0700, Dave Bayer wrote:
GHC issues a Warning: Defaulting the following constraint(s) to type
`Int' for the definition of z.
Why don't you just use -fno-warn-type-defaults?
...
ghc -Werr -Wall is a often
I couldn't find a compile-time here document facility, so I wrote one
using Template Haskell:
module HereDocs(hereDocs) where
import Control.Exception
import Language.Haskell.TH.Syntax
getDoc :: String - [String] - (String,[String])
getDoc eof txt =
let (doc,rest) = break (== eof) txt
On Jun 22, 2007, at 2:46 PM, David Roundy wrote:
I think of top-level type declarations as type-checked comments,
rather
than a seat-belt. It forces you to communicate to others what a
function
does, if that function may be used elsewhere. I like this.
Although it can
be cumbersome for
On Jun 22, 2007, at 12:34 PM, Dave Bayer wrote:
In particular, I always want defaulting errors, because sometimes I
miss the fact that numbers I can count on my fingers are defaulting
to Integer.
So no one took the bait to actually offer me a shorter idiom, but I
thought about the above
On Jun 22, 2007, at 4:37 PM, David Roundy wrote:
You get strongly-typed code whether or not you enable warnings.
In my opinion it's delusional to think one is using strong typing if
one doesn't enable warnings. All the puffing about the advantages of
strong typing look pretty silly if
Perhaps in here we should start using
\x - (unlines . (dropWhile (/= x)) . lines)
Instead :)
Dave,
On 23/06/07, Thomas Schilling [EMAIL PROTECTED] wrote:
On 22 jun 2007, at 22.17, Derek Elkins wrote:
[blah blah blah]
A less (potentially) offensive way of formulating
On Jun 22, 2007, at 3:11 PM, Brandon S. Allbery KF8NH wrote:
(1) any way to flag a pattern match as I know this is okay, don't
warn about it without shutting off pattern match warnings completely?
GHC doesn't issue warnings about patterns on the left of =
For example, the following code
On Jun 25, 2007, at 4:48 AM, Simon Peyton-Jones wrote:
The intention is that it should be straightforward to suppress
warnings.
Simply add a type signature for 'z', or for the naked 3 in z's
definition.
I constructed my example from larger modules peppered with small
integer constants;
On Jun 25, 2007, at 8:15 AM, Simon Peyton-Jones wrote:
i2 = 2 :: Int
i3 = 3 :: Int
The code
{-# OPTIONS_GHC -Wall -Werror #-}
module Main where
i2 = 2 :: Int
i3 = 3 :: Int
main :: IO ()
main = putStrLn $ show (i2,i3)
generates the errors
Main.hs:5:0: Warning: Definition but no type
On Mon, Jun 25, 2007 at 07:31:09PM +0100, Ian Lynagh wrote:
I don't know if (^) in particular is what is causing you problems, but
IMO it has the wrong type; just as we have
(!!) :: [a] - Int - a
genericIndex :: (Integral b) = [a] - b - a
we should also have
(A /\ B) in the preceding
proof and not A and B on their own.
What proof which would allow me to discharge my assumptions A and B?
I can see in my head how it makes perfect sense, but can't jiggle a
way to do it using only the given derivations.
Many thanks,
Dave
(A /\ B) = C
(= I)2
(A = (B = C)) = ((A /\ B) = C)
Learning is fun :)
Dave,
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
On Jun 28, 2007, at 12:17 PM, Greg Meredith wrote:
Haskellians,
Once you have a polymorphic let, why do you need 'let' in the base
language, at all? Is it possible to formulate Haskell entirely with
do-notation where there is a standard monad for let environments?
Probably this was all
On Jun 29, 2007, at 10:07 AM, Nicolas Frisby wrote:
I wrote a combination reader/writer monad (a la the RWS monad in the
mtl) and I find myself wanting to use multiple instances of it in the
same stack of transformers. The functional dependencies prevent this
from working out.
I found myself
On Jun 30, 2007, at 6:31 AM, Claus Reinke wrote:
has anyone else had similar experiences with expressive limitations
of monadic programming? things that one might be able to work
around, but that don't feel as natural or simple as they should be?
things that one hasn't been able to express at
On Jul 5, 2007, at 8:00 AM, Paul Moore wrote:
It probably depends on your perspective. I've found lots of tasks that
would be a simple library call in Python, but which require me to
write the code myself in Haskell. Examples:
* Calculate the MD5 checksum of a file
How's this, only one line
On Jul 5, 2007, at 9:52 AM, Paul Moore wrote:
You're changing the problem from finding a Haskell library (which only
needs to be installed on the development machine at compile time) to
finding a 3rd party utility, which has to be installed at runtime
...
Not a good trade-off.
The
On Jul 7, 2007, at 4:23 AM, Thomas Conway wrote:
the performance model for haskell programs is at best inscrutable
I punched my first Basic program by hand with a paper clip, in my
high school library. Even after experiencing an APL interpreter at
19, it has taken half my life to fully
Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting
the implementation of lazy evaluation to avoid explicitly writing an
efficient concatenable list data structure. This felt like cheating,
or at least like using a screwdriver as a crowbar, to be less
judgmental.
On Jul 9, 2007, at 6:52 PM, Donald Bruce Stewart wrote:
bayer:
Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting
the implementation of lazy evaluation to avoid explicitly writing an
efficient concatenable list data structure.
See also
Claus Reinke claus.reinke at talk21.com writes:
will ultimately make its contents easier to find. but if you
want to avoid answering questions again and again on the
list, you need to improve the cache of answers.
Bingo. On less technical forums, e.g. FlyerTalk, the do a search equivalent to
Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk writes:
Yes, the sheer volume of posts is definitely becoming a problem (for me,
at least).
As a newcomer I was stunned that this otherwise very sophisticated community was
using an email list rather than a bulletin board. The shear torrent of
Gregory Propf gregorypropf at yahoo.com writes:
So what the hell is the difference between them? Int and Integer.
They aren't synonyms clearly. What's going on?
http://www.haskell.org/haskellwiki/Learn_Haskell_in_10_minutes
is a good starting point for answering this and similar
Creighton Hogg wchogg at gmail.com writes:
Hi Haskell, Sorry to contribute to the noise but given that we've been
talking about categories lately, I was wondering if anyone had any
opinions on good universities for studying category theory. I'm
trying to figure out where to apply for my
of the authors of
Dave Bayer, Persi Diaconis
Trailing the dovetail shuffle to its lair
Ann. Appl. Probab. 2 (1992), no. 2, 294-313
which found a closed form formula for the probabilities involved in riffle
shuffles, how people shuffle e.g. playing bridge. This work was summarized as
seven
apfelmus apfelmus at quantentunnel.de writes:
While your observation that merge may create an implicit heap is true,
it doesn't happen in your code :) When unfolding the foldr1, we get
something like
2:.. `merge'` (3:.. `merge'` (5:.. `merge1` (...)))
i.e. just a linear chain of
Miguel Mitrofanov miguelimo38 at yandex.ru writes:
There are a lot of tutorials ensuring the reader that, although
Haskell is based on category theory, you don't have to know CT to use
Haskell. So, is there ANY Haskell tutorial for those who do know CT?
If you know category theory, it's a
Ronald Guida ronguida at mindspring.com writes:
I started looking at the Euler problems [1]. I had no trouble with
problems 1 through 10, but I'm stuck on problem 11. I am aware that
the solutions are available ([2]), but I would rather not look just
yet.
I am the author of that solution
Here is another prime sieve. It is about half the length of the
fastest contributed code (ONeillPrimes) and nearly as fast until it
blows up on garbage collection:
% cat ONeillPrimes.hs | grep -v ^-- | wc
18511056306
% cat BayerPrimes.hs | grep -v ^-- | wc
85 566
As an exercise, trying to understand the beautiful paper
Stream Fusion
From Lists to Streams to Nothing at All
Duncan Coutts, Roman Leshchinskiy and Don Stewart
http://www.cse.unsw.edu.au/~dons/papers/CLS07.html
Simon Michael simon at joyful.com writes:
Hi Andreas - very good problem report, thanks.
I have just cleaned up the archive links at
http://www.haskell.org/haskellwiki/Mailing_lists a bit. I added the
ever-excellent gmane and an overview of all archives.
Ok, this list was crushing my
It appears that at least on gmane, my posts to this thread ended up as
singletons, breaking the thread. Here are the posts:
http://article.gmane.org/gmane.comp.lang.haskell.cafe/26426
http://article.gmane.org/gmane.comp.lang.haskell.cafe/26466
___
Donald Bruce Stewart dons at cse.unsw.edu.au writes:
bayer:
I couldn't find a compile-time here document facility, so I wrote one
using Template Haskell:
Very nice! You should wrap it in a little .cabal file, and upload it to
hackage.haskell.org, so we don't forget about it.
Details
this boilerplate?
Thanks,
Dave
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Neil Mitchell ndmitchell at gmail.com writes:
then lookup, instead of just as the else clause.
Thanks, all. After digesting what was on this thread as I woke up this
morning, I ended up writing something rather close to this.
I have a reusable wrapper around System.Console.GetOpt that adds
Chris Smith cdsmith at twu.net writes:
Can someone clarify what's going on with the standard library in
Haskell?
...
sites for the thousandth time before realizing that so-and-so's GUI
library hasn't actually been touched since they finished their class
Short answer: Our system is very
if this window is closed and main is evaluated again both GHCi
and hugs die thus:
GHCi: Illegal instruction (core dumped)
hugs: Unexpected signal
Any thoughts?
On 31/07/07, Dave Tapley [EMAIL PROTECTED] wrote:
Excellent, thank you Marc your advice worked perfectly.
For reference the corrected
Bryan O'Sullivan bos at serpentine.com writes:
Pardon me while I veer off-topic, but you could also use Pandoc to do
this. No forking required.
http://sophos.berkeley.edu/macfarlane/pandoc/
What I'm doing is neither Haskell nor Markdown specific; I allow any HTML
markup filter that plays
So I stared at the documentation in Control-Concurrent, learned about
finally and MVar variables, and crossed the genes from the suggestions here
to come up with
runCommand :: String - String - IO (String,Bool)
runCommand cmd input = do
(inp,out,err,pid) - runInteractiveCommand
Is anyone maintaining the AC-Vector-Fancy package?
I haven't had a reply from the latest maintainer (Andrew Coppin) on Hackage,
so I thought I'd open it up to cafe:
I think I have found a problem with the union function:
If you look here: http://hpaste.org/49889
You will see that line 4 gives a
Is anyone maintaining the AC-Vector-Fancy package?
I haven't had a reply from the latest maintainer (Andrew Coppin) on Hackage,
so I thought I'd open it up to cafe:
I think I have found a problem with the union function:
If you look here: http://hpaste.org/49889
You will see that line 4 gives a
why?
Dave,
[1] http://sourceforge.net/mailarchive/message.php?msg_id=2807
[2] Taken from
http://www.haskell.org/ghc/docs/6.10.4/html/libraries/Cabal/src/Distribution-Simple.html#simpleUserHooks
-- Cleaning
clean :: PackageDescription - CleanFlags - IO ()
clean pkg_descr flags = do
let
On 30 September 2011 03:02, Claude Heiland-Allen cla...@goto10.org wrote:
On 30/09/11 02:45, DukeDave wrote:
1. Is there some reason (other than 'safety') that cabal install cleans
everything up?
As far as I've experienced and understand it, it doesn't - it's more that
GHC can detect when
anything but ^C) cause
this behaviour?
3. If you have sent ^C from GHCi, why do you then have to kill three
times to get out of GHCi?
Feel free to pull the repo [1] and try it out, you'll need the latest
dev release of wxWidgets [5] installed.
Thanks!
Dave,
[1] http://darcsden.com/DukeDave
-- Forwarded message --
From: Anonymous Void bitsofch...@gmail.com
Date: Sun, Jul 22, 2012 at 2:10 AM
Subject: Re: [Haskell-cafe] System.Win32.Registry... Help?
To: Tim Matthews tim.matthe...@gmail.com
I've looked into their docs, but I can't for the life of me figure out
how to
80 matches
Mail list logo