Module System.Posix.Directory of the unix package defines
getWorkingDirectory :: IO FilePath
changeWorkingDirectory :: FilePath - IO ()
I believe the functionality is quite portable and not limited to unix-like
systems. I know that e.g. Windows has chdir and getcwd. Module Filesystem of
Ertugrul Söylemez wrote:
damodar kulkarni kdamodar2...@gmail.com wrote:
The Monad class makes us define bind (=) and unit (return) for our
monads.
Why the Kleisli composition (=) or (=) is not made a part of Monad
class instead of bind (=)?
Is there any historical reason behind this?
The
David Barbour wrote:
Create an extra TVar Int for every `chunk` in the array (e.g every 256
elements, tuned to your update patterns). Read-write it (increment it, be
sure to force evaluation) just before every time you write an element or
slice it or slice the array element.
Incrementing and
Benjamin Franksen wrote:
I have trouble building this latest beta.
I found that the build uses ghc-6.8.3 which, I think, is no longer supported
for building darcs, IIRC.
Sorry for the noise.
Cheers
Ben
___
Haskell-Cafe mailing list
Haskell-Cafe
This beta has a bug. This is what just happened to me:
frank...@aragon:~/ctl/MLS-Controls/clean ___
13:27:51
darcs push
Pushing to /srv/csr/repositories/controls/darcs/epics/ioc/MLS-
Controls/base-3-14...
Tue Aug 17 15:20:42 CEST 2010 benjamin.frank...@bessy.de
pbrowne wrote:
Dependent Types (DT)
The purpose of dependent types (DT) is to allow programmers to specify
dependencies between the parameters of a multiple parameter class.
'Dependent type' means result type (of a function) can depend on argument
values. This is not (directly) supported in
Alistair Bayley wrote:
I get a strange error building Takusen (more precisely: the module
Foreign/C/UTF8.hs) with ghc-6.8.3. It says
[1 of 9] Compiling Foreign.C.UTF8 ( Foreign/C/UTF8.hs,
dist/build/Foreign/C/UTF8.o )
/tmp/ghc18936_0/ghc18936_0.s: Assembler messages:
I get a strange error building Takusen (more precisely: the module
Foreign/C/UTF8.hs) with ghc-6.8.3. It says
aragon: .../ghc-6.8.3/Takusen-0.8.1 ./Setup build -v
Reading parameters
from
/srv/projects/ctl/franksen/haskell/ghc-6.8.3/Takusen-0.8.1/takusen.buildinfo
Creating dist/build (and its
Ian Lynagh wrote:
On Thu, Jun 26, 2008 at 02:51:05PM +0200, Benjamin Franksen wrote:
aragon: .../i386-unknown-linux/ghc-6.8.3 utils/pwd/pwd forwardslash
[1]28489 floating point exception utils/pwd/pwd forwardslash
This happens when your system (libc?) is too old to run the binaries
When I try to ./configure, I get this error:
aragon: .../i386-unknown-linux/ghc-6.8.3
./configure --prefix=/projects/ctl/franksen/usr
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
Which we'll
Philippa Cowderoy wrote:
On Mon, 17 Sep 2007, Adrian Hey wrote:
Ideally the way to deal with this is via standardised interfaces (using
type classes with Haskell), not standardised implementations. Even this
level of standardisation is not a trivial clear cut design exercise.
e.g we currently
Derek Elkins wrote:
On Sat, 2007-09-08 at 12:24 +1000, Stuart Cook wrote:
On 9/8/07, Ryan Ingram [EMAIL PROTECTED] wrote:
This does what you want, I think:
{-# LANGUAGE ExistentialQuantification #-}
module Exist where
data Showable = forall a. (Show a) = Showable a
instance Show
Dan Piponi wrote:
On 9/5/07, Ketil Malde [EMAIL PROTECTED] wrote:
On Wed, 2007-09-05 at 08:19 +0100, Simon Peyton-Jones wrote:
Error message from GHCi:
test/error.hs:2:8:
No instance for (Num String)
arising from use of `+' at test/error.hs:2:8-17
Possible fix:
Bryan O'Sullivan wrote:
Henning Thielemann wrote:
I thought it must be possible to define an unboxed array type with
Storable elements.
Yes, this just hasn't been done. There would be a few potentially
tricky corners, of course; Storable instances are not required to be
fixed in
Hugh Perkins wrote:
Sooo.. what is the modern equivalent of Prolog?
I once learned about LIFE (Logic, Inheritance, Functions, and Equations) and
was deeply fascinated. However, it died the quick death of most research
languages.
Cheers
Ben
___
Sven Panne wrote:
On Tuesday 31 July 2007 19:39, Duncan Coutts wrote:
[...]
The docs for those packages would be available for packages installed
via cabal (assuming the user did the optional haddock step) and would
link to each other.
Well, on a normal Linux distro a user should *never*
Simon Peyton-Jones wrote:
| From the ghc manual:
|
| ---
| 7.3.3. The recursive do-notation
| ...
|
| It is unfortunate that the manual does not give the translation rules,
or at
| least the translation for the given example.
Hmm. OK. I've improved the manual with a URL to
Edward Ing wrote:
Hi,
I am trying to install Haskellnet. But the configuration breaks on
dependency of network-any in GHC 6.6.
I thought network-any was part of Hierarchical libraries?
If not where do I get it?
The generic place for libraries nowadays is hackage:
Simon Peyton-Jones wrote:
| It is unfortunate that the [ghc] manual does not give the translation
rules, or at
| least the translation for the given example.
Hmm. OK. I've improved the manual with a URL to the main paper
http://citeseer.ist.psu.edu/erk02recursive.html
which is highly
Jean-Philippe Bernardy wrote:
foldr on ElemsView is defined as such:
foldr f i (ElemsView c) = foldr (f . snd) i c
so, for example:
getElementList = toList . ElemViews
Ok, thanks, this helps. I had forgot to look at the instances.
When I designed this code (some years ago), I didn't
Hi
I am using collections-0.3 and need to perform some operations on keys resp.
values of a map. In the concrete implementations there are functions
like 'elems' and 'keys' but there is no such thing in Data.Collections.
Instead there are the types 'ElemsView' and 'KeysView' and
functions
Andrew Coppin wrote:
Surely all this means is that the magical mdo keyword makes the
compiler arbitrarily reorder the expression...?
It is not magical but simple syntactic sugar. And no, the compiler does
not 'arbitrarily reorder' anything, you do the same in any imperative
language with
Brian Hulley wrote:
Stefan O'Rear wrote:
On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote:
On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote:
OTOH, your proposal provides (IMO) much more natural syntax for
multi-pattern anonymous functions, especially if we
John Dell'Aquila wrote:
Setup.hs wants a module that Cabal hides. Am I doing something wrong
(newbie :-)
or should I try to fall back to Cabal-1.1.6.1?
$ ghc --make -o setup Setup.hs
Setup.hs:13:7:
Could not find module `Distribution.Compat.FilePath':
it is hidden (in package
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about combining compatible things things
together in a row.
/None/ of them force any particular
Andrea Rossato wrote:
The task this library should do is simple: given an xml object
(representing a bibliographic reference), render it with rules stored
in a different xml object (the citation style). While I think I can
find solutions for this problem - the rendering -, what I find
Brian Hulley wrote:
Brian Hulley wrote:
apfelmus wrote:
Brian Hulley schrieb:
main = do
buffer - createBuffer
edit1 - createEdit buffer
edit2 - createEdit buffer
splitter - createSplitter (wrapWidget edit1) (wrapWidget
edit2)
Brandon S. Allbery KF8NH wrote:
On Aug 13, 2007, at 16:29 , Benjamin Franksen wrote:
Let's take the simplest example: Maybe. The effect in question is the
premature abortion of a computation (when Nothing is returned). And of
course Maybe sequences these effects, that's what you use
Derek Elkins wrote:
On Mon, 2007-08-13 at 22:29 +0200, Benjamin Franksen wrote:
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about
Isaac Dupree wrote:
Benjamin Franksen wrote:
I'd be careful. Introducing a network connection into the equation makes
the
object (its methods) susceptible to a whole new bunch of failure modes;
think indefinite delays, connection loss, network buffer overflow, etc
etc.
It may be a mistake
Andrew Coppin wrote:
Like that time yesterday, I compiled from program and got a weird
message
about GHC about ignored trigraphs or something... What the heck is a
trigraph?
Everyone's favorite obscure feature of the ANSI C99 preprocessor.
Probably you had something like this is
Hugh Perkins wrote:
Now, arguably the fact that we are pattern matching on the receiver at
least
means we dont do anything with the invalid data sent, but this is not
rocket
science: the standard technique to ensure decent compile time validation
in
rpc-type things is to use an interface.
Donn Cave wrote:
(I have a soft spot for O'Haskell, but
alas I must be nearly alone on that.)
You are /not/ alone :-) I always found it very sad that O'Haskell and also
its sucessor Timber (with all the good real-time stuff added) died
the 'quick death' of most research languages.
Cheers
David Roundy wrote:
Several times since reading the beginning of this discussion I've wished I
had the new syntax so I could write something like:
do if predicateOnFileContents (- readFile foo) then ...
instead of either
do contents - readFile foo
if predicateOnFileContents
David Menendez wrote:
On 8/9/07, Benjamin Franksen [EMAIL PROTECTED] wrote:
Donn Cave wrote:
(I have a soft spot for O'Haskell, but
alas I must be nearly alone on that.)
You are /not/ alone :-) I always found it very sad that O'Haskell and
also
its sucessor Timber (with all the good real
David Roundy wrote:
On Thu, Aug 09, 2007 at 08:45:14PM +0200, Benjamin Franksen wrote:
David Roundy wrote:
Several times since reading the beginning of this discussion I've
wished I
had the new syntax so I could write something like:
do if predicateOnFileContents (- readFile foo
Salvatore Insalaco wrote:
I noticed that in Takusen there're just two instances to implement to
make any Haskell type db-serializable: DBBind / SqliteBind for
serialization and DBType for deserialization.
FWIW, I have two patches lying around (attached) that I wanted to send to
the Takusen
apfelmus wrote:
Jules Bean wrote:
Have you tried using pattern guards for views?
f s | y : ys - viewl s =
| EmptyL - viewl s =
Hm, I'd simply use a plain old case-expression here
f s = case viewl s of
y : ys - ...
EmptyL - ...
In other words,
Hi,
I am using Text.Printf (package base, ghc-6.6.1) and am missing %X
formatting. Checking out the darcs repo of the base package I see that it
has already been added there. Is there any way to upgrade to the latest
version while keeping ghc-6.6.1? I keep hearing Bulat saying that this is
not
Dan Licata wrote:
On Jul25, apfelmus wrote:
The point is to be
able to define both zip and pairs with one and the same operator : .
There's actually a quite simple way of doing this. You make the view
type polymorphic, but not in the way you did:
type Queue elt
empty :: Queue
Ian Lynagh wrote:
On Wed, Jul 25, 2007 at 03:38:50PM +0200, Benjamin Franksen wrote:
I am using Text.Printf (package base, ghc-6.6.1) and am missing %X
formatting. Checking out the darcs repo of the base package I see that it
has already been added there. Is there any way to upgrade
Niko Korhonen wrote:
Bryan Burgers wrote:
tpdfs range = do
g - newStdGen -- get a random generator
(g1, g2) - return $ split g -- make two random generators out of it
return $ zipWith combine (randomRs range g1) (randomRs range g2)
-- get two streams of random numbers, and combine
Re, Joseph (IT) wrote:
Ah, I thought I might have to resort to one of the ByteStrings modules.
I've heard of them but was more or less avoiding them due to some
complexities with installing extra libraries in my current dev
environment. I'll try to work that out with the sysadmins and try it
Thomas Schilling wrote:
On 22 jul 2007, at 23.46, Benjamin Franksen wrote:
On a different note: I've been wondering how difficult it would be to
re-write Parsec so that it doesn't act on a /list/ of tokens but on a
Sequence (defined in Data.Collections from collections package).
Because
Hi,
I often run into the following issue: I want to write a list of lengthy
items like this
mylist = [
quite_lengthy_list_item_number_one,
quite_lengthy_list_item_number_two,
quite_lengthy_list_item_number_three
]
With the current layout rules this is a parse error (at the closing
Robert Dockins wrote:
Some sort of in-langauge or extra-language support for mechanicly
producing
the source files for the full API from the optimized core API
would be
quite welcome.
Have you considered using DrIFT? IIRC it is more portable and easier to use
than TH.
Handling export
mgsloan wrote:
On 3/24/07, Vivian McPhail [EMAIL PROTECTED] wrote:
I agree with Sven, but...
What I want to push is a 'mathematically sound' numeric prelude. A
proper
numerical prelude should have bona fide mathematical obects like groups,
rings, and fields underlying common numerical
Jean-Philippe Bernardy wrote:
Please look at
http://darcs.haskell.org/packages/collections/doc/html/Data-Collections.html
for an effort to make most common operation on bulk types fit in a
single framework.
The last time I looked at this (shortly after you started the project) I
wasn't sure if
[sorry for the somewhat longer rant, you may want to skip to the more
technical questions at the end of the post]
Twan van Laarhoven wrote:
I would like to announce version 0.3 of my Data.CompactString library.
Data.CompactString is a wrapper around Data.ByteString that represents a
Unicode
[sorry for the somewhat longer rant, you may want to skip to the more
technical questions at the end of the post]
Twan van Laarhoven wrote:
I would like to announce version 0.3 of my Data.CompactString library.
Data.CompactString is a wrapper around Data.ByteString that represents a
Unicode
Benjamin Franksen wrote:
Bertram Felgenhauer wrote:
Having to rely on GC to close the fds quickly enough is another problem;
can this be solved on the library side, maybe by performing GCs when
running out of FDs?
Claus Reinke wrote:
in good old Hugs, for instance, we find in function
Bertram Felgenhauer wrote:
Having to rely on GC to close the fds quickly enough is another problem;
can this be solved on the library side, maybe by performing GCs when
running out of FDs?
Claus Reinke wrote:
in good old Hugs, for instance, we find in function newHandle in
src/iomonad.c
P. R. Stanley wrote:
Chaps,
is there another general pattern for mylen, head or tail?
mylen [] = 0
mylen (x:xs) = 1 + mylen (xs)
head [] = error what head?
head (x:xs) = x
tail [] = error no tail
tail (x:xs)= xs
There are of course stylistic variations possible, e.g. you can use case
isaac jones wrote:
Iavor and I just made the trivial modification for DoAndIfThenElse
syntax as described here:
http://hackage.haskell.org/trac/haskell-prime/wiki/DoAndIfThenElse
You can see the change here:
http://darcs.haskell.org/haskell-prime-report/report/haskell-report-html/exps.html
David Tolpin wrote:
On Mon, 19 Feb 2007 02:17:34 +0400, Marc Weber [EMAIL PROTECTED]
wrote:
Would it make sense to specify partial type declarations ?
I don't need an answer right now.
no, it wouldn't.
I think it would, and it seems there are others. See e.g.
Jules Bean wrote:
Dmitri O.Kondratiev wrote:
Set module here is built with list and uses among other things list
comparison functions such as (==) and (=).
Q1: Where List module is imported from?
GHC Base package contains Data.List module, not just List module.
List was the old name for
Hi
It would be a nice feature if one could look online at the documentation of
a package, i.e. w/o downloading and building the package first. Fr
instance, haddock generated API docs can give you a much better idea what
you can expect from a library package than the mere package description.
Stefan Heinzmann wrote:
is there a library for Haskell that implements scaled integers, i.e.
integers with a fixed scale factor so that the scale factor does not
need to be stored, but is part of the type?
I dimly remember that there has been some work done on this in connection
with (and by
Arnaud Bailly wrote:
Joel Reymont wrote:
Is there a Java parser implemented using Parsec?
There is:
http://jparsec.codehaus.org/
Jparsec is an implementation of Haskell Parsec on the Java platform. I
think Joel was asking for a parser for the Java language, written in
Haskell using the
[EMAIL PROTECTED] wrote:
Here are two surveys (somewhat outdated) on the use of formal methods in
industry:
http://citeseer.ifi.unizh.ch/39426.html
http://citeseer.ifi.unizh.ch/craigen93international.html
Both of these links are dead. Could you post author and title?
Thanks
Ben
Udo Stenzel wrote:
Benjamin Franksen wrote:
Udo Stenzel wrote:
Sure, you're right, everything flowing in the same direction is usually
nicer, and in central Europe, that order is from the left to the right.
What a shame that the Haskell gods chose to give the arguments
Udo Stenzel wrote:
Sure, you're right, everything flowing in the same direction is usually
nicer, and in central Europe, that order is from the left to the right.
What a shame that the Haskell gods chose to give the arguments to (.)
and ($) the wrong order!
But then application is in the
[sorry, this was meant to go to the list]
On Wednesday 31 January 2007 00:40, Bulat Ziganshin wrote:
Saturday, January 27, 2007, 12:00:11 AM, you wrote:
and support operational reasoning, i.e. creating and understanding
programs by mentally modeling their execution on a machine. This form
Bulat Ziganshin wrote:
2. it bites me too. it's why i say that C++ is better imperative
language than Haskell. there are also many other similar issues, such
as lack of good syntax for for, while, break and other
well-known statements, inability to use return inside of block and
so on
You
Andres Loeh wrote:
I cannot see how an empty list of tyvars is useful or desirable in
practice:
data Foo = Foo (forall . Int)
is equivalent to just
data Foo = Foo Int
so why bother to permit the former? It probably indicates some error in
the thinking of the programmer, so the
Yitzchak Gale wrote:
Steve Downey wrote:
OO, at least when done well, maps well to how people think.
Um, better duck. I am afraid you are about to draw
some flames on that one. I hope people will try
to be gentle.
No problem ;-)
I'll never get tired quoting Dijkstra; one of the things
Chris Kuklewicz wrote:
Note that I have not mentioned laziness. This
is because it only helps to solve problems more elegantly -- other
languages can model infinite computations / data structures when it is
useful to do so.
Reminds me of yet another quote from Dijkstra
Chris Kuklewicz wrote:
Aside on utterly useful proofs: When you write concurrent programs you
want an API with strong and useful guarantees so you can avoid deadlocks
and starvation and conflicting data read/writes. Designing an using such
an API is a reasoning exercise identical to creating
Steve Schafer wrote:
Neil Bartlett wrote:
It also highlights some of the misconceptions that still exist and
need to be challenged, e.g. the idea that Haskell is too hard or is
impractical for real work.
Haskell _is_ hard, although I don't think it's _too_ hard, or I wouldn't
be here,
[EMAIL PROTECTED] wrote:
We show the typeclass implementation of the example used to make the
case for GADTs. We demonstrate the higher-order abstract-syntax-based
embedding of a language in Haskell and implement static and dynamic
semantics of the language. The interpreter of the language is
David Roundy wrote:
Another idea is whether the syntax could be extended to indicate a failure
to match? This would actually be useful even without views, but it's
particularly useful with views (and especially so in the context of the
above warnings). I'd imagine something like (with
Tomasz Zielonka wrote:
On Mon, Jan 22, 2007 at 11:34:32PM +0100, Benjamin Franksen wrote:
I would be interested whether you can not only /check/ well-typedness,
but also /establish/ it, i.e. is it possible to have the input to the
type-checker be an /untyped/ representation (such as obtained
Neil Davies wrote:
In investigating ways of getting less jitter in the GHC concurrency
runtime I've found the following issue:
The GHC concurrency model does all of its time calculations in ticks
- a tick being fixed at 1/50th of a second. It performs all of these
calculations in terms the
Philippe de Rochambeau wrote:
my original query concerning partial application was triggered by the
following statement from Thomson's The Craft of Functional
Programming, p. 185:
multiplyUC :: (Int, Int) - Int
multiplyUC (x,y) = x * y
multiply :: Int - Int - Int
multiply x y = x * y
On Friday 12 January 2007 09:04, Simon Peyton-Jones wrote:
| On 1/3/07, Roberto Zunino [EMAIL PROTECTED] wrote:
| 1) Why the first version did not typececk?
|
| 1) Class constraints can't be used on pattern matching. They ARE
| restrictive on construction, however. This is arguably bug
Jim Apple wrote:
On 1/3/07, Roberto Zunino [EMAIL PROTECTED] wrote:
1) Why the first version did not typececk?
1) Class constraints can't be used on pattern matching. They ARE
restrictive on construction, however. This is arguably bug in the
Haskell standard. It is fixed in GHC HEAD for
Alex Queiroz wrote:
On 12/12/06, Benjamin Franksen [EMAIL PROTECTED] wrote:
PS: Please try to include exactly the relevant context in replies, no
more, no less. Your original question (stripped down to the body of the
text) would have been relevant, here, but neither 'Hello', nor 'Cheers
Kirsten Chevalier wrote:
On 12/12/06, Patrick Mulder [EMAIL PROTECTED] wrote:
PS I like the idea of a book Hakell for Hackers
Maybe Haskell for People Who Want to Be Hackers?
I would never buy a book with such a title, even if I didn't have the
slightest clue about programming. However
Lyle Kopnicky wrote:
The code below is using way more RAM than it should. It seems to only
take so long when I build the 'programs' list - the actual
reading/parsing is fast. For a 5MB input file, it's using 50MB of RAM!
Any idea how to combat this?
1) I strongly recommend to work through at
Joachim Durchholz wrote:
These activities are among the major reasons why I'm finally prepared to
get my feet wet with Haskell after years of interested watching.
I'll probably fire off a set of newbie questions for my project, though
it might still take a few days to get them organized well
Sebastian Sylvan wrote:
Perhaps a single largish application could be the end product of the
book. Like a game or something. You'd start off with some examples
early on, and then as quickly as possible start working on the low
level utility functions for the game, moving on to more and more
Alex Queiroz wrote:
On 12/11/06, Stefan O'Rear [EMAIL PROTECTED] wrote:
No. Haskell's lists are linked lists, enlarge creates a single new link
without modifying (and copying) the original.
Thanks. Is there a way to mimic this behaviour with my own code?
It is the default for any data
On Wednesday 06 December 2006 07:40, Bernie Pope wrote:
On 05/12/2006, at 1:00 PM, Benjamin Franksen wrote:
Bernie Pope wrote:
If you want a global variable then you can use something like:
import System.IO.Unsafe (unsafePerformIO)
global = unsafePerformIO (newIORef
Stefan O'Rear wrote:
[...]
Unfortunately, it turns out that
allowing foralls inside function arguments makes typechecking much
harder, in general impossible.
Just a tiny correction: AFAIK, it is type /inference/ which becomes
undecidable in the presence of higher rank types -- checking works
Bernie Pope wrote:
If you want a global variable then you can use something like:
import System.IO.Unsafe (unsafePerformIO)
global = unsafePerformIO (newIORef [])
But this is often regarded as bad programming style (depends who you
talk to).
Besides, isn't this example
Malcolm Wallace wrote:
Unfortunately, I suspect that teaching is _the_ major use-case for
defaulting. Imagine, day one, lesson one, a student types
Prelude 1+2
into Hugs, and gets the response
Unresolved overloading: Num a
Huh? This is lesson one, and you already need to
Bulat Ziganshin wrote:
Monday, November 27, 2006, 1:46:34 AM, you wrote:
I hate to be nitpicking but GPL is not only compatible with but
encourages commerce in general and commercial software in particular. It
is incompatible with proprietary software. There's a difference.
of course, but
S. Alexander Jacobson wrote:
Ok, I'm not sure I understand the answer here, but how about a
workaround. My current code looks like this:
tt = let ?withPassNet=wpn
?withPassNet'=wpn
?withPassNet''=wpn
in passNet passnet [user] regImpl b
The type of
Lemmih wrote:
It's my great pleasure to announce cabal-test, the automatic tester
for Cabal projects.
[...]
http://darcs.haskell.org/~lemmih/cabal-test
What about changing
#!/usr/bin/env runhugs
to
#!/usr/bin/env runhaskell
in your Setup.lhs?
Cheers
Ben
Bulat Ziganshin wrote:
Friday, November 24, 2006, 7:32:55 PM, you wrote:
Josef Svenningsson posted a comment on my blog today that got me to
thinking. He suggested that people may be intimidated by the size of
MissingH, confused by the undescriptive name, and don't quite know what's
in
Ken Takusagawa wrote:
Is there a Haskell implementation of an efficient priority queue
(probably heap-based) out there that I can use? I do not see it in
the GHC libraries.
Unfortunately the base package contains only the specialized Data.Sequence
and not the general annotated 2-3 finger
[sorry for quoting so much, kinda hard to decide here where to snip]
Cale Gibbard wrote:
On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote:
A comment on that video said:
- BEGIN QUOTE
It seems to me that STM creates new problems with composability.
You create two classes of code:
isto wrote:
Hi all,
Weekly news had a link to article
Local and global side effects with monad transformers
and the following is from there (minor modification done):
import Control.Monad.List
import Control.Monad.State
import Control.Monad.Writer
test5 :: StateT Integer (ListT
Dougal Stanton wrote:
Is there some sort of equivalent of the if/then/else construct for use
in the IO monad? For instance the following can get quite tedious:
do bool - doesFileExist filename
if bool
then sth
else sth'
Is there a more compact way of writing that? Something
[sorry for quoting so much, kinda hard to decide here where to snip]
Cale Gibbard wrote:
On 23/11/06, Jason Dagit [EMAIL PROTECTED] wrote:
A comment on that video said:
- BEGIN QUOTE
It seems to me that STM creates new problems with composability.
You create two classes of code:
Hi Liyang HU
you wrote:
On 23/11/06, Benjamin Franksen [EMAIL PROTECTED] wrote:
One answer is in fact to make it so that Console.Write can be rolled
back too. To achieve this one can factor the actual output to another
task and inside the transaction merely send the message
[EMAIL PROTECTED] wrote:
Do anyone had any experience with JHC?
I tried to install it second time and again get an error during library
build.
It's a pity, we need a speed in our very lazy code. ;)
I had the same problem and asked John. He explained why and told me how to
proceed:
that
Daniel,
you wrote:
I suspect I would be classified as a newbie relative to most posters on
this list but here's my thoughts anyway...
[...]
One of my initial responses to haskell was disappointment upon seeing
head,
fromJust and the like. 'Those look nasty', I sez to meself.
From day one
John Hughes wrote:
From: Robert Dockins [EMAIL PROTECTED]
It seems to me that every possible use of a partial function has some
(possibly imagined) program invariant that prevents it from failing.
Otherwise it is downright wrong. 'head', 'fromJust' and friends
don't do anything to put that
Henning Thielemann wrote:
On Fri, 10 Nov 2006, Benjamin Franksen wrote:
Although one could view this as a bug in the offending module it makes
me somewhat uneasy that one additional import can have such a drastic
effect on the code in a module /even if you don't use anything from that
module
1 - 100 of 341 matches
Mail list logo