I've started a blog series on writing a chess engine in Haskell. I
just posted the second blog entry today:
http://sequence.complete.org/node/361
I suspect there's more work to be done on that function, though. It
seems like there should be a nice way to remove that flip in apply.
Any thoughts?
Hi folks!
So, in writing my chess engine, I've been trying to maintain 2 Map
objects. One maps squares on the board to Ints, the other maps Ints to
actual Pieces. It occurred to me that it would be useful to explicitly
have a Bi-directional Map, which does the maintenance of keeping the
Maps
I've been reading the classic Why functional programming matters
paper [1] lately, particularly looking at the alpha beta stuff. I've
ported all his code to haskell, but I have a question.
His algorithm takes a board position, creates a gametree out of it,
maps a static evaluation function over
You may also find this function helpful. I'll let you work out why/how:
uncurry :: (a - b - c) - (a, b) - c
uncurry f p = f (fst p) (snd p)
On 9/13/07, Krzysztof Kościuszkiewicz [EMAIL PROTECTED] wrote:
On Fri, Sep 14, 2007 at 03:45:02AM +0100, PR Stanley wrote:
5. Using merge, define a
(Replying on haskell-cafe)
Let me start with a disclaimer: I haven't looked at your code
extensively. That said, the feeling that I get from it is one of
listening to a non-native speaker. The things in your program are
obviously not completely inaccurate, or they wouldn't have
type-checked. And,
Wasn't this the point of the elevator speech thread a few weeks ago?
Saying in 30 seconds why haskell is good and what it can do for you?
On 10/4/07, Don Stewart [EMAIL PROTECTED] wrote:
It was raised at CUFP today that while Python has:
Python is a dynamic object-oriented programming
If you change your type declarations to 'newtype' declarations, I
believe you would get the effect that you want, depending on what you
mean by 'equivalent'. In that case, Foo and Bar would essentially be
strings, but you could not use either of them in a place where the
other is expected, nor
http://halogen.note.amherst.edu/~jdtang/scheme_in_48/tutorial/overview.html
is pretty fast-paced. You also may want to check out
http://en.wikibooks.org/wiki/Haskell where you can pretty much go at
your own pace.
On 10/11/07, Paulo J. Matos [EMAIL PROTECTED] wrote:
Hello all,
I'm interested in
type Pkg = (Pkgtype,Address,Payload)
type Table = [(Address,Port)]
update_table1::Table - Pkg - Table
update_table1 [] (t,d,y) = [(t,d,y)]
The problem is that your function's type signature says it's returning
a Table, which is a [(Address,Port)], but it's actually returning a
I think it's not at all clear what you're asking for here. can you
give an example inputs and outputs you'd expect? It looks like you're
trying to implement some kind of dictionary or something? Also, have
you looked at the library Data.Tree? It might be useful for you.
On 11/3/07, Ryan Bloor
Looks to me like you want:
poolNewsB = foldr poolNews (0,0,0,0)
On Nov 10, 2007 11:54 AM, Ryan Bloor [EMAIL PROTECTED] wrote:
hiya
I was wondering how I would get the second function do recursively do the
function for poolNews xs tried that and it fails.
Ryan
--Give wins, draws
Don's code intrigued me, so I fired up my trusty emacs and ghci, and
turned it into actual code, which type-checks. Well, ok, I kind of
randomly poked at it, while begging for help, which I received in
abundance from #haskell, particularly oerjan, and Don himself. Anyway,
here's the code:
{-#
I think there are some great ideas here, and it would be a fantastic
project to do as a community, via a wikibook. I, for one, have been
studying haskell for several months, and am just starting to see a
little bit of light when it comes to monads. I think it would be
beneficial to work through a
Well, perhaps if nothing else, we could use a wikibook to
collaboratively work on the structure of such a book, and then from
that you could publish a real book. I don't really know the legal
issues, though. I am thinking of several books though which have been
written and released both as full
Well, I'm not opposed at all to a written final form. I guess I just
don't see that and using a wikibook to assist in our collaboration as
mutually exclusive. Anyway, I'd love to help in any such project. By
the way, I seem to be messing up the threads. What is considered the
correct way to reply
Ok, well I think we can all agree that such a book is a good idea. I
suggest we take the discussion to some kind of collaboration tool.
It's pretty hard to do just on this mailing list. There are a lot of
options, such as finding a forum somewhere, creating a wiki book
somewhere and having a
Hello, fellow Haskellers!
jcreigh, from #haskell, has found a great set of exercises to work
through. Check out the new wiki pages indexed at
http://haskell.org/haskellwiki/99_Haskell_exercises . These have all
been done in lisp, but of COURSE they can be done at least as well in
Haskell, if not
Here, I think an examples worth a thousand poierr, words. This one
comes from YAHT. Consider the two implementations of the following
function:
lcaseLetters :: String - String
lcaseLetters s = map toLower (filter isAlpha s)
lcaseLetters :: Strint - String
lcaseLetters = map toLower . filter
Hi all,
An interesting question came up in #haskell the other day, and I took
the resulting discussion and wrapped it up into a simple tutorial for
the wiki. Since I'm quite a newbie to haskell myself, I'd appreciate
any double-checking of my logic and, of course, any other
comments/suggestions.
:t liftM
forall r (m :: * - *) a1. (Monad m) = (a1 - r) - m a1 - m r
liftM (+2) (Just 3
Just 5
liftM (+2) Nothing
Nothing
(Thanks to allbery_b for contributing to the discussion on #haskell)
On 1/25/07, John Ky [EMAIL PROTECTED] wrote:
Is there a built-in function that already does this?
I thought it was very telling that, at the end of the interview, when
the interview asked, In general, where is programming going?, the
responses were all things that haskell is good at. Shame it's such an
impractical language.
On 1/26/07, Benjamin Franksen [EMAIL PROTECTED] wrote:
Steve
I won't speak for anyone else, but I remember when recursion first
clicked. It was in a 400-level data structures and algorithms class.
I had already done a fair amount of chess programming (which of course
does a massive amount of recursion), but it still seemed a bit magical
to me. When the
Hi everyone,
I've got an interesting problem here I'm trying to solve. Actually,
I've got several problems which seem to have a very similar structure.
I want to find a way to abstract them to solve other problems which
can be thought about in the same way. Here they are:
http://hpaste.org/307
I found it useful to work through an example where lazy evaluation was
important, and wrote it up in a tutorial. It may or may not help you,
no guarantees, but here it is:
http://www.haskell.org/haskellwiki/Haskell/Lazy_Evaluation
Any comments are welcome!
Andrew
On 2/4/07, TJ [EMAIL PROTECTED]
Hi Bahtijar!
I'm not going to answer your question directly, but let me give you
some background that will hopefully help you discover the pretty
solution yourself.
Consider this definition:
ones = 1 : ones -- This list is essentially [1,1,1,...]
And this expression:
take 5 ones
Now,
Heh. I still remember in my first Comp Sci class, in C, I had to take
a 2-line recursive tree traversal...and write it iteratively (in like
50 lines).
On 2/6/07, Dan Piponi [EMAIL PROTECTED] wrote:
I've always found recursive solutions to problems elegant and I've
always been fed up of people
That's definitely the lazy approach!
On 2/9/07, Dougal Stanton [EMAIL PROTECTED] wrote:
Well, nobody likes tainting their beautiful pure code with IO, so I
rewrote the Random module to take advantage of the latest research [1]:
module Random where
getRandom = 4
Cheers,
D.
[1]
Has anyone worked through HSOE lately? I'm wondering if I'm going to
be able to work through the examples that use their graphic library,
under gtk2hs on fedora. Is there a workaround for this?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
All,
I've made my first code drop for a new project I'm working on (though
it's really an extension of work I've been doing for about 5 years).
Information and code can be found at
http://code.haskell.org/ChessLibrary/ . Comments and suggestions
warmly welcomed. Also, I'm looking for an
Dmitri,
Excellent questions. There's one step you're missing. Most of your
questions revolve around 'foo - bar' constructs within a monad. I
would suggest that you review the de-sugaring rules at
http://en.wikibooks.org/wiki/Haskell/Syntactic_sugar#Do_and_proc_notation
and see if that helps you
This post borders on being off-topic, but it seems like people on this
list would be interested.
First, some of you know that I had the distinct privilege of flying
out to Microsoft this week to interview for a Software Development
Engineer position on their Live Search team. So I want to first
2008, Andrew Wagner wrote:
The recruiter even said something along the lines of anyone who knows
haskell is certainly worth our time to talk to. Moral of the story: Haskell
rocks, and even Microsoft knows it!
Interesting. That is they are aware what they support in Cambridge for
years
Did they score you on coding or on geometry?
It was definitely more on coding and my ability to think about the problem.
For what it's worth, a 3-dimensional kd tree really flew on this problem.
I did some reading up on this, and it seems interesting. It would be
need to implement something
Wow. Where did you come up with the stack trace? That's...impressive.
On Sun, Jul 6, 2008 at 5:07 PM, Don Stewart [EMAIL PROTECTED] wrote:
I win, almost ...
13:13:18 dons dolio: yeah, it was ... almost ... an April 1 style post
:)
And yes, this was truly shocking on a number of levels.
What's going on is that data structures in Haskell are immutable. Thus,
when you call push on a stack, you get a new stack with the new element
pushed onto it, and the original stack is left un-touched.
On Fri, Feb 5, 2010 at 10:56 AM, michael rice nowg...@yahoo.com wrote:
Not using Stack for
Err, is there some reason you don't have simpler interfaces like:plaintext
:: String - Application
plaintext text = \env - return $ Response
{ status = 200
, headers = [ (Content-Type, text/plain) ]
, body= text
}
On Mon, Apr 20, 2009 at 12:30 PM, Joe Fredette
This sounds like a really interesting question. To save some people weeding
through the thread and Jon Harrop's usual trolling garbage, here's a
description of the problem:
[quote]
Here's [a]language to to interpret (where postfix * means tupling):
Variables: x
Integer literals: i
Terms:
t =
This reminds me of a server app I saw recently in a language called
Clojure. Clojure is a relatively new lisp variant targeting the JVM,
and has a home-grown STM layer built into the language. Anyway, the
app I saw was a (admittedly didactic-focused) multi-threaded MUD
server (google
http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Err, I'm not seeing the danger of this
(+) :: forall a. (Num a) = a - a - a
Doesn't this require the two parameters to be the same instance of Num?
On Fri, May 8, 2009 at 10:51 AM, Sittampalam, Ganesh
ganesh.sittampa...@credit-suisse.com wrote:
Stephan Friedrichs wrote:
When looking for an
Hmm, I never knew that. Is that a GHC thing? Is it strictly necessary? Seems
like it could be done in the Num instance for Integers, Ints, etc.
On Fri, May 8, 2009 at 11:51 AM, Neil Mitchell ndmitch...@gmail.com wrote:
Err, I'm not seeing the danger of this
(+) :: forall a. (Num a) = a - a -
So I've been reading a lot about a (relatively) new language called Clojure.
One of its goals is to make concurrency easier via a built-in home-grown
STM. Anyway, one of the ways it tries to do this is to have completely
immutable data structures. Every time I read a tutorial about this in
On Tue, May 12, 2009 at 10:05 AM, Maurício briqueabra...@yahoo.com wrote:
snip
(I think something like that could be nice when we have modules
with 200 declarations and just a few are (not) going to be
exported.)
Thanks,
Maurício
Uh, show me such a module, and I'll show you a module
Purity allows our data structures to have a lot of sharing.
This is separate to laziness.
Ah, so haskell does do it. Interesting that it so rarely comes up, whereas
it's frequently mentioned in clojure.
Laziness lets us build up interesting structures that have unusual
sharing.
So far as I know, all immutable languages do it. Like Don, I think the
reason it's emphasized so much in Clojure is because of trying to convert
the Java crowd and introducing them to immutability. With mutable languages
you have to clone _everything_ for fear of later changes affecting
Perhaps drawTree on
http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Tree.html
2009/5/14 José Romildo Malaquias j.romi...@gmail.com
Hello.
I would like to pretty print a tree in a way that its structure is
easily perceived.
For instance, consider the declarations:
Don't forget to include higher-order functions in one of those important
points.
On Mon, May 18, 2009 at 12:36 PM, John Van Enk vane...@gmail.com wrote:
Thanks Joe,
Your assumption is correct--the whole presentation will be longer. I wanted
to use 3 or 4 slides to introduce the language and
Is there a list of projects that will be worked on during this, or how will
that work?
On Thu, May 21, 2009 at 5:39 PM, Brent Yorgey byor...@seas.upenn.eduwrote:
Hi all!
We are in the early stages of planning a Haskell hackathon/get
together, Hac φ, to be held this summer at the University
I'm not sure what you're using at the end of the identifier search', but
it needs to be the single quote that's on the same key as the double quotes.
I suspect that's where it's blowing up.
On Thu, May 28, 2009 at 9:56 PM, michael rice nowg...@yahoo.com wrote:
This code, from YAHT (Section
Try c = zip a b
On Tue, Jun 9, 2009 at 9:05 AM, ptrash ptr...@web.de wrote:
Hi,
I have the following two lists:
a = [1,2,3]
b = [A,B,C]
I want a combination of the to lists:
c = [(1,A), (2, B), (3, C)]
How can I do this?
I have tried
c = [(x,y) | x - a, y - b]
But this just
http://www.haskell.org/haskellwiki/Tying_the_Knot would seem to be relevant.
On Tue, Jul 14, 2009 at 9:55 AM, Cristiano Paris fr...@theshire.org wrote:
I would like to know them.
I'm looking for small snippets of code that are elegant when written
in Haskell (which is lazy by default) but
Err, technically, aren't functions and constructors mutually exclusive? So
if something is a function, it's, by definition, not a constructor?
On Wed, Jul 15, 2009 at 6:25 AM, Eugene Kirpichov ekirpic...@gmail.comwrote:
Technically, the reason is not that (++) is a function, but that it is
not
There are a few different kinds of trees, but if you only need to
store data on the leaves, that representation will work. As for your
sumTree function, you are indeed missing a case...consider sumTree
(Leaf 3)! Once you deal with that case, the other two can actually be
combined (since sum [] =
Brilliant. This made my day. I must admit, I looked briefly at the
paper after I saw the link, yawned, and closed it. Then I saw Andrew's
comment, skimmed the paper, becoming more and more convinced that it
was a joke, saw the last line, and then had to go back and read the
whole thing again. Just
The reasons I've always heard for this is that 1.) It's so easy to define a
tree and 2.) There are tons of different variations of trees and what you
can do with them. Not that I 100% agree, just what I've always heard.
On Mon, Dec 1, 2008 at 6:09 AM, Christian Maeder
[EMAIL PROTECTED]wrote:
with it. Still, I suspect there's something there. Maybe I'll take a stab at
it this week sometime.
On Mon, Dec 1, 2008 at 6:24 AM, Andrew Wagner [EMAIL PROTECTED]wrote:
The reasons I've always heard for this is that 1.) It's so easy to define a
tree and 2.) There are tons of different variations of trees
Hi all,
public interface IEngine {
void foo();
void bar(string bah);
...
}
public class Program {
public void Run(IEngine engine){
while(true){
string command = GetLine();
if (command.startsWith(foo)){
engine.foo();
} else if (command.startsWith(bar)){
All,
Wadler posted a blog entry the other day about a paper on pattern-matching
in Haskell (http://wadler.blogspot.com/). I've taken a first stab at turning
it into actual code for hackage (http://hpaste.org/13215). There are two
commented-out definitions that don't type-check, though, and the
:
Andrew Wagner wrote:
Wadler posted a blog entry the other day about a paper on
pattern-matching
in Haskell (http://wadler.blogspot.com/). I've taken a first stab at
turning
it into actual code for hackage (http://hpaste.org/13215). There are
two
commented-out definitions that don't type
The problem here is even slightly deeper than you might realize. For
example, what if you have a list of functions. How do you compare two
functions to each other to see if they're equal? There is no good way really
to do it! So, not only is == not completely polymorphic, but it CAN'T be.
There
Yes, of course, sorry for the typo.
On Mon, Dec 22, 2008 at 9:17 AM, Denis Bueno dbu...@gmail.com wrote:
2008/12/22 Andrew Wagner wagner.and...@gmail.com:
The problem here is even slightly deeper than you might realize. For
example, what if you have a list of functions. How do you compare
There are two ways to fix this. Let me see if I can get my syntax right this
time :)
1.) Let GHC work out the Eq instance:
data Shape = Square | Triangle | Circle deriving Eq
2.) Tell GHC how to do it explicitly:
data Shape = Square | Triangle | Circle
instance Eq Shape where
Square ==
I wouldn't call it a programming model so much as a library. A
programming model sounds to me like an idiom, whereas there's an actual
typeclass in the standard library called Monad. Yes, there's special sugar
built into GHC (and, likely, any haskell implementation) for it, but it
really is at its
I'm sure there's a way to do this, but it's escaping me at present. I
want to do something like this:
data Foo = Bar a = Foo a Bool ...
That is, I want to create a new type, Foo, whose constructor takes
both a Boolean and a value of a type of class Bar.
class.
On Dec 27, 2008, at 1:44 PM, David Menendez d...@zednenem.com wrote:
On Sat, Dec 27, 2008 at 2:24 PM, Andrew Wagner wagner.and...@gmail.com
wrote:
I'm sure there's a way to do this, but it's escaping me at present.
I want
to do something like this:
data Foo = Bar a = Foo a Bool
Err, is this just for academic purposes, or is there some deeper reason you
want an Enum instance of String? That will dictate how to define the
functions. For example, you could just as easily imagine other definitions
of fromEnum, such as:
fromEnum = read . concatMap (show . ord)
Why?
I think this sounds like a great idea! I'll have to get ahold of the book
first though.
On Tue, Dec 30, 2008 at 8:10 PM, Creighton Hogg wch...@gmail.com wrote:
Hello Haskellers,
For those of your who aren't nose-deep in Real World Haskell at the
moment, I'd like to start a small group for
Ok, so I'm inching closer to understanding monads, and this question
popped up today. Consider the following 2 declarations:
data Foo a = Bar a
data (Ord a) = Baz a = Bah a
Note that both of these have kind * - *. However, Baz could never be
an instance of monad, because there is a restriction
This is all a good idea, but I've found that I've never learned nearly
as much as when I started bashing out some code. So I highly recommend
starting up some project that's interesting to you too.
Hang out in #haskell in IRC (freenode). That's probably the best
resource you'll ever find when
Steffen,
I've done some chess AI programming in the past, so I'd be happy to
help with this project. I have some pretty fundamental design
suggestions that I'll write up for the wiki page.
Maxime,
Handling different chess engines isn't hard. chess engine
communication is pretty standardized -
a much more patient man than I!
On 3/19/07, Maxime Henrion [EMAIL PROTECTED] wrote:
Andrew Wagner wrote:
Steffen,
I've done some chess AI programming in the past, so I'd be happy to
help with this project. I have some pretty fundamental design
suggestions that I'll write up for the wiki page
Andrzej,
I'd love to hear some of your thoughts on these things. I agree with
you about brute-force not being the best approach in haskell (or maybe
at all). I think we should switch to haskell-cafe, since that's where
much of this discussion has gone, and that's more for extended
discussions
to the complexity of the game).
Two-Player-zero-sum games are very library friendly kinds of games.
However, interesting
other games are probably too diverse to be pressed in a general
framework, aren't they?
Henning Thielemann schrieb:
On Mon, 19 Mar 2007, Andrew Wagner wrote:
Steffen,
I've
I agree with Andrew Wagner re: Haskell and AI.
There are some relevant resources on Haskell, Maths, and Logic:
The Haskell Road To Logic, Maths And Programming (Paperback)
by Kees Doets (Author), Jan van Eijck (Author)
http://www.amazon.com/Haskell-Road-Logic-Maths-Programming/dp/0954300696
PROTECTED] wrote:
From: Andrew Wagner [EMAIL PROTECTED]
After all, functional programming has
long been recognized for being good at AI, yet you rarely hear about
it being done in Haskell.
A small observation that might or might not be useful for implementing
game AIs: 2 player games
strategies for non-trivial games. I'd definitely like to
hear more of your thoughts on this though. Thanks for all your great
work!
On 3/19/07, Andrew Wagner [EMAIL PROTECTED] wrote:
Hi Dan,
I just made the connection between you and your blog, by the way -
great stuff, keep it up. This particular
Alfonso,
Lemmih (from #haskell) has been kind enough to give me space on a
server for a darcs repo. I could add your code there if you'd like to
email it to me, or we could ask him if you could have your own space.
Perhaps you could email me off-list and we can arrange it.
On 3/20/07, Alfonso
Hi Arun,
Your problem description seems a little vague - which is
understandable, considering how embedded in your business model it is.
As for general recommendations, I'm no guru, but I would suggest
looking at the existing XML libraries in Haskell [1], and if that's
not powerful enough, check
The time has come! Calling all Haskell programmers interested in AI!
I've established a new home base at
http://www.haskell.org/haskellwiki/AI . Functional programming has
long been recognized as an excellent paradigm for Artificial
Intelligence. It's time to make Haskell an important language in
Sure, it's added!
On 3/23/07, Henning Thielemann [EMAIL PROTECTED] wrote:
On Fri, 23 Mar 2007, Andrew Wagner wrote:
The time has come! Calling all Haskell programmers interested in AI!
I've established a new home base at
http://www.haskell.org/haskellwiki/AI . Functional programming has
I'm no expert, but I will point you to 2 links that I think will be
helpful on this topic on the wiki:
http://www.haskell.org/haskellwiki/Lifting (especially if you're
familiar with functors)
http://www.haskell.org/haskellwiki/Simple_StateT_use (for a simple
example with a monad transformer)
I'm
This looks nice! Is there a project page for Haste2? How far along is
it? Is it based on gtk2hs?
On 4/23/07, David Waern [EMAIL PROTECTED] wrote:
What IDE support is available for Haskell (Visuall Haskell, EclipseFP),
anything else?
I'm working in Haste2[1]. But it is unreleased :P
[1]
Hi Toby,
On 4/24/07, Toby Hutton [EMAIL PROTECTED] wrote:
Hi,
I'm trying to implement a fast kd-tree in Haskell.
http://en.wikipedia.org/wiki/Kd-tree It's a binary tree
representing space partitions.
Trees are pretty easy to implement in haskell, due to their inherent
recursive nature. For
You could also look at
http://haskell.org/haskellwiki/Introduction#Quicksort_in_Haskell
if the algorithm is all you're interested in, and not the particular
implementation.
On 5/17/07, Andrew Coppin [EMAIL PROTECTED] wrote:
PR Stanley wrote:
Well, actually, this was scanned from a book but the
Yeah, but to learn how to start the hovercraft, you have to take a
6-week training class.
On 7/23/07, Hugh Perkins [EMAIL PROTECTED] wrote:
On 7/23/07, Jonathan Cast [EMAIL PROTECTED] wrote:
Fine you guys can have Haskell as the hovercraft, not one of those big
ones
mind,
How do you get
Haskell is certainly up for the challenge. You may be interested in
this paper, for example: http://citeseer.ist.psu.edu/335780.html
On 7/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have a set of problems in the field of constaint satisfaction and
I'm looking for a tool for this. In
say you have this code :
putStrLn 1 putStrLn 2 putStrLn 3
you can imagine each of the calls to putStrLn gets implicitly passed a
variable (here, the world ) and they happen in succession so it's
like a loop.
It breaks down further as soon as you add any amount of complexity to
the
That's great, unless the imperative programmer happens to be one of
the 90% of programmers that isn't particularly familiar with group
theory...
On 8/1/07, Greg Meredith [EMAIL PROTECTED] wrote:
Haskellians,
Though the actual metaphor in the monads-via-loops doesn't seem to fly with
this
an IO monad is a delayed action that will be executed as soon as that action
is needed for further evaluation of the program.
I'm not sure I like this, as it seems to confuse the issue. An expert
should correct me if I'm wrong, but monads in and of themselves don't
depend on laziness.
C-c C-b ... when pressed for the first time this will start an
interpreter (ghci or hugs most of the time), when pressed with a
running interpreter it'll switch to that buffer.
C-c C-l ... Load the current file into the editor. There is no
function-wise compilation.
Don't forget C-c
I know this isn't quite what you asked, but java has a very clearly
laid-out grammar in EBNF at
http://java.sun.com/docs/books/jls/first_edition/html/19.doc.html .
Between that and Parsec, I would think it would be fairly simple to
write a parser. Of course, adding semantics is another story.
On
I've removed it from the next release of haskell-mode, so if you need it,
please explain why.
So C-c C-l is the preferred method for re-loading? I don't know enough
about the details to know if :l and :r do exactly the same things in
ghci.
___
All,
Is there some better way to do this? It seems like a lot of boilerplate.
Thanks!
http://hpaste.org/13807#a1
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
, your symbols
function can be rewritten as
symbols :: Sentence - [Symbol]
symbols s = nub $ listify (const True) s
true is not that simple, because this code is NOT boilerplate - each
alternative is valuable by itself.
On 10 Jan 2009, at 23:56, Andrew Wagner wrote:
All,
Is there some
Holy concatenated operators, Batman!
Is that an operator or Batman?
(yes, I know, 3 operators)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie
I think perhaps the correct question here is not how many instances of
Monoid are there?, but how many functions are written that can use an
arbitrary Monoid. E.g., the fact that there are a lot of instances of Monad
doesn't make it useful. There are a lot of instances of Monad because it's
useful
I've been playing around with this, but haven't been able to come up with
anything.
myFunc f (a,b) (c,d) = (f a c, f b d)
It feels as if there should be a nice simple version of this using some
combination of {un,}curry, on, , ***, or something else.
Any thoughts?
http://www.haskell.org/haskellwiki/Haskell_in_industry could be of interest
to you
On Mon, Jan 19, 2009 at 2:34 PM, Andrew Coppin
andrewcop...@btinternet.comwrote:
Is it possible to earn money using Haskell? Does anybody here actually do
this?
Inquiring minds want to know... ;-)
Such a database would help me counter by boss's
argument that it's impossible to find and hire Haskell programmers.
Err, people actually say such things? And they say _we're_ out of touch with
the real world?
___
Haskell-Cafe mailing list
Strange little bit of code:
http://moonpatio.com:8080/fastcgi/hpaste.fcgi/view?id=829#a829
If I do any of the following, all of which seem natural to me, it fails to
typecheck:
1. move f out of the 'where' clause (with or without a type signature)
2. put the same type signature on f as is
1 - 100 of 153 matches
Mail list logo