"Brian Hulley" <[EMAIL PROTECTED]> writes:
>> You can't be serious. This would cause far more problems than the
>> current rule.
> Why? Surely typing one tab is better than having to hit the spacebar 4
> (or 8) times?
What you type depends on your editor. I hit tab, and the editor
inserts an ap
Suggested by a question from sethk on #haskell irc channel.
Solves an FAQ where people have often resorted to cpp or m4:
a `trace' that prints line numbers.
> module Location (trace, assert) where
>
> import qualified Control.Exception as C (catch)
> import System.IO.Unsafe (unsafePerformIO
hi,
i've noted that the new haskellwiki has dropped syntax highlighting
support for haskell code fragments. while i think that full highlighting
might be overkill, at least different color markup of code and comments
would certainly be nice.
investigating the options for syntax highlighting in me
BH> > Why? Surely typing one tab is better than having to hit the
spacebar 4 (or 8)
BH> > times?
PC> Not when it prevents me from ever exhibiting the slightest shred of style
PC> in my code. I use that control for readability purposes in my code.
> [snip]
BH> I'm really puzled here. I've been usin
G'day all.
Quoting Christian Maeder <[EMAIL PROTECTED]>:
> I suggested:
>
>f . g $ h x
>
> or
>f $ g $ h x
Of these, the first version only makes sense if you want to single out h
for some reason. I'm known to do this, for example, if h is a record
accessor.
The second is just
On Wed, 1 Mar 2006, Brian Hulley wrote:
> Ben Rudiak-Gould wrote:
> > Brian Hulley wrote:
> > > Here is my proposed layout rule:
> > >
> > > and whose indentation is accomplished *only* by tabs
> >
> > You can't be serious. This would cause far more problems than the
> > current rule.
>
> Why?
Ben Rudiak-Gould wrote:
Brian Hulley wrote:
Here is my proposed layout rule:
1) All layout keywords (where, of, let, do) must either be followed
by a single element of the corresponding block type, and explicit
block introduced by '{', or a layout block whose first line starts
on the *next* lin
Today I started on a simple IRC bot framework thingy. I decided to
post the source code here so people can look at it and tell me what
the heck I did wrong :-P
> module IRC where
>
> import Control.Monad.State
> import System.IO
> import Network
>
> {--}{---
Although the discussion about Array refactoring died
down quickly on the Haskell' mailing list, I've been
noodling on refactoring the various Collections in
Haskell. In doing so, I've bumped into a problem with
type classes that I can't resolve. The issue is as
follows:
I'm designing a Colle
Brian Hulley wrote:
Here is my proposed layout rule:
1) All layout keywords (where, of, let, do) must either be followed by a
single element of the corresponding block type, and explicit block
introduced by '{', or a layout block whose first line starts on the
*next* line
I wouldn't have mu
On Tue, 28 Feb 2006, Tom Hawkins wrote:
> It appears runCommand uses /bin/sh by default, but our environment
> needs tcsh. Is there any way to set an alternative shell?
Ideally, it would be better to fix your environment, but something
like this should work if you can't do that -
runSh cmd
It appears runCommand uses /bin/sh by default, but our environment
needs tcsh. Is there any way to set an alternative shell?
-Tom
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
HiActually I don't need to duplicate them, it's an oversight from my side when I converted my code from my own channels to TChan.regardsStefanAm 28.02.06 schrieb
Anatoly Zaretsky <[EMAIL PROTECTED]>:
Why do you need to duplicate channels?___Haskell-Cafe
On Feb 28, 2006, at 8:33 AM, Christian Maeder wrote:You may compare your code with Keith's implemenation of a Trie. http://article.gmane.org/gmane.comp.lang.haskell.libraries/2571 Thanks for the pointer, I searched for "Prefix Tree" which is an alternative name for trie so I didn't find that impl
Ben Rudiak-Gould wrote:
Brian Hulley wrote:
Whoever thought up the original Haskell layout rule assumed that
people would be happy using a single fixed width font, tabs set to 8
spaces, and didn't care about the brittleness of the code (in the
face of identifier renamings) it allowed one to writ
Henning Thielemann wrote:
Maybe you should use a kind of convex combination, that is
(x-oldLower)*a + (oldUpper-x)*b
Maybe lower*(1-z) + upper*z where z = (x-oldLower) / (oldUpper-oldLower). I
think this will always map oldLower and oldUpper to lower and upper exactly,
but I'm not sure it's
David F.Place wrote:
The PrefixMap datastructure implements a Prefix Tree which allows a
key/value relationship.
\begin{code}
data PrefixMap k v = Node (Maybe v) (Map.Map k (PrefixMap k v))
deriving (Show)
\end{code}
You may compare your code with Keith's implemenation of
Brian Hulley wrote:
Whoever thought up the original Haskell layout rule assumed that people
would be happy using a single fixed width font, tabs set to 8 spaces,
and didn't care about the brittleness of the code (in the face of
identifier renamings) it allowed one to write.
Are you complainin
On Tue, Feb 28, 2006 at 04:52:40AM -0500, Cale Gibbard wrote:
> > -- collect error messages from all failing parsers
> > [ err | Left err <- map parse xs]
>
> I don't see how you lose this one at all.
because somewhere else, you might want to use 'parse' as a maybe.
somewhere else, you might want
Why do you need to duplicate channels?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 28/02/06, John Meacham <[EMAIL PROTECTED]> wrote:
> On Tue, Feb 28, 2006 at 01:09:03AM -0500, Cale Gibbard wrote:
> > > Well, the benefit of the Identity monad is so that the user of a routine
> > > can choose to recover gracefully by using a different monad, you only
> > > use the Identity mona
Marcin 'Qrczak' Kowalczyk wrote:
Simon Marlow <[EMAIL PROTECTED]> writes:
I think the reason we set O_NONBLOCK is so that we don't have to test
with select() before reading, we can just call read(). If you don't
use O_NONBLOCK, you need two system calls to read/write instead of
one. This prob
Hi
I think I finally found the problem. I had to replace the call to usleep with a call to threadDelay and it worked.
regards
Stefan
2006/2/27, Stefan Aeschbacher <[EMAIL PROTECTED]>:
HiI try to write a program that reads from a socket and communicates the result over a TChan and writes it to st
23 matches
Mail list logo