Ertugrul Söylemez wrote:
> damodar kulkarni 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?
>>
>>
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 a
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-C
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.
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
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 c
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) => Showab
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
> fi
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
>>
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
___
Haske
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
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:
http://hackage.has
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
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),
Hugh Perkins wrote:
> On 8/11/07, Benjamin Franksen <[EMAIL PROTECTED]> wrote:
>> A certain amount
>> of dynamism wrt the message content (high level protocol) is necessary
for
>> systems for which Erlang was designed, namely large distributed control
>> systems w
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 'withEle
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 po
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, es
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 pa
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 overflo
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 limi
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 effec
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) (wrapWi
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
> dif
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 parti
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.
>
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
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:
>> &
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 th
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 predicateOnF
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
B
peterv wrote:
> Having only a couple of days of practice programming Haskell (but having
> read lots of books and docs), I find myself writing very explicit low
level
> code using inner "aux" functions (accumulators and loops). Then I force
> myself to revise the code, replacing these aux function
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 m
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
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
>emp
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 pos
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 o
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.Colle
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
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,
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
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.
>>> H
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
bracket)
Nicolas Frisby wrote:
> Regarding type variable naming, a few of my more hardware minded
> friends I've asked to try Haskell often tease me about the opaque type
> variable names in the Prelude--it seems greater consideration of type
> variable names in the Prelude might behoove new users.
I think
Robert Dockins wrote:
>> After taking a look at the Haddock docs, I was impressed by the amount of
>> repetition in the APIs. Not ony does Data.CompactString duplicate the
whole
>> Data.ByteString interface (~100 functions, adding some more for encoding
>> and decoding), the whole interface is agai
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
[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
> Unicod
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 o
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
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.
http://www.mail-a
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.
>
>
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
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.
Chee
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 Ha
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 w
[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
> s
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 thin
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 creati
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
(http://www.cs.utex
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
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 ter
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
> multip
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 ar
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 fo
On Thursday 14 December 2006 07:34, Kirsten Chevalier wrote:
> On 12/14/06, Benjamin Franksen <[EMAIL PROTECTED]> wrote:
> > Kirsten Chevalier wrote:
> > > (Since, of course,
> > > one should never apply the term "hacker" to oneself.)
> >
> >
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. H
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, her
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
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 mo
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 wel
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
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 wor
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)
&g
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
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
>
>
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 cours
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 tr
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
>>
Liyang HU wrote:
> On 24/11/06, Benjamin Franksen <[EMAIL PROTECTED]> wrote:
>> I have a pretty good idea how much data is going to be produced by
>> my own code, and if it's a bit more than I calculated then the whole
>> process merely uses up some more memor
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 tra
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?
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
[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 class
[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:
>
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 da
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
Jan-Willem Maessen wrote:
> On Nov 9, 2006, at 7:16 PM, Benjamin Franksen wrote:
>> Carl Witty wrote:
>>> If you have operators op1 and op2, where the compiler sees
>>> conflicting
>>> requirements for the precedence of op1 and op2, then they are
>>> tr
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
Carl Witty wrote:
> On Thu, 2006-11-09 at 22:20 +0100, Benjamin Franksen wrote:
>> Henning Thielemann wrote:
>> > Maybe making fixity declarations like type class instance declarations
>> > is
>> > good.
>>
>> I thought so too at first but, h
Henning Thielemann wrote:
> Maybe making fixity declarations like type class instance declarations is
> good.
I thought so too at first but, having thought about it for a while, I now
see this will cause /major/ problems. The precedence relations as declared
explicitly by the programmer must form
Jón Fairbairn wrote:
> Syntax 1, based on Phil Wadler's improvement of my old
> proposal. The precedence relation is a preorder.[...]
>
> infix {ops_1; ops_2; ...; ops_n}
>
> The alternative syntax is exemplified thus:
>
> infix L + - (L * / (R ^))
>
> [...]
I think both ways (I like the secon
Nicolas Frisby wrote:
> I don't see how it's too complex. Isn't
>
> infixl ??
> prec ?? < $
> (??) = whenOperator
>
> exactly what you want to say?
Yes. I'd add that the system should (of course) take the transitive closure
over all explicitly stated precedence relations. That really cuts
Joachim Breitner wrote:
> Am Dienstag, den 24.10.2006, 12:48 +0200 schrieb Benjamin Franksen:
>> > Am Dienstag, den 24.10.2006, 00:44 +0300 schrieb Misha Aizatulin:
>> >> hello all,
>> >>
>> >>why is it not possible to use guards in do-expressio
Bas van Dijk wrote:
> On Monday 23 October 2006 21:50, Tomasz Zielonka wrote:
>> unsafeInterleaveMapIO f (x:xs) = unsafeInterleaveIO $ do
>> y <- f x
>> ys <- unsafeInterleaveMapIO f xs
>> return (y : ys)
>> unsafeInterleaveMapIO _ [] = return []
>
> Great it works! I d
Joachim Breitner wrote:
> Hi,
>
> Am Dienstag, den 24.10.2006, 00:44 +0300 schrieb Misha Aizatulin:
>> hello all,
>>
>>why is it not possible to use guards in do-expressions like
>>
>>do
>> (a, b) | a == b <- getPair
>> return "a and b are equal"
>
> Probably beca
1 - 100 of 247 matches
Mail list logo