[Haskell-cafe] Running classical logic

2008-03-28 Thread Jim Apple
We can't safely extract a t out of IO t, but we can run an IO t, interact with the environment, and then see the t. Griffin ( http://citeseer.ist.psu.edu/griffin90formulaeastypes.html ) explained that we can do the same thing with (t - r) - r by interacting with the context. That is, he defined a

[Haskell-cafe] Glome raytracer bug: bad output with -O2 -fasm

2008-03-28 Thread Jim Snow
I was trying to get Blinn highlights working with my raytracer, and kept getting ugly artifacts. After trying a bunch of things, I finally compiled without -O2, and the artifacts went away. Here's what I mean: http://syn.cs.pdx.edu/~jsnow/glome/Glome.hs-noartifact.png

Re: [Haskell-cafe] Recursion problem in infinite list model

2008-03-28 Thread Hans Aberg
On 28 Mar 2008, at 03:03, Ryan Ingram wrote: Another way to defer the evaluation of the second argument of (-+) is like this: (-+) :: a - List a - List a x -+ y = List(f) where f 0 = x f k = case y of List g - g (k-1) This is exactly what the lazy pattern will do at compile-time.

RE: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Paul Keir
Thanks, I'd thought it was something to do with incompatible types. I can now create a simpler problem: tester2 = reserved parameter | symbol : Certainly I could use reserved : instead of symbol, but where is my thinking with symbol here going wrong? Surely the above example isn't so odd?

Re: [Haskell-cafe] Unescaping with HaXmL (or anything else!)

2008-03-28 Thread Henning Thielemann
On Thu, 27 Mar 2008, Anton van Straaten wrote: I want to unescape an encoded XML or HTML string, e.g. converting quot; to the quote character, etc. Since I'm using HaXml anyway, I tried using xmlUnEscapeContent with no luck, e.g. with HaXml 1.19.1: let (CString _ s _) = head $

[Haskell-cafe] compilation succeeds -- execution fails

2008-03-28 Thread Jason Dusek
I have a program here: https://svn.j-s-n.org/public/haskell/cedict currently at revision 302, which compiles okay but I can't get it to work. I'm using the FFI to take a (currently small) array and translate it into a Map. It compiles fine and loads fine -- but it doesn't run

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-28 Thread Thomas Schilling
Did you try removing all .hi and .o files? On 28 mar 2008, at 10.34, Jason Dusek wrote: I have a program here: https://svn.j-s-n.org/public/haskell/cedict currently at revision 302, which compiles okay but I can't get it to work. I'm using the FFI to take a (currently small)

Re: [Haskell-cafe] Functional dependencies with Type Classes

2008-03-28 Thread Wolfgang Jeltsch
Am Freitag, 28. März 2008 02:12 schrieb Henning Günther: Hi, suppose there are two (identical) classes: class Res a b | a - b where getRes :: a - b and class Res2 t where type Member t getRes2 :: t - Member t It is easy to automatically make every instance of Res2 an

Re: [Haskell-cafe] Wumpus World

2008-03-28 Thread Benjamin L. Russell
--- Richard A. O'Keefe [EMAIL PROTECTED] wrote: [snip] The Prolog results at http://shootout.alioth.debian.org/ are only for the open source system SWI Prolog, which is basically a one-man effort. The commercial SICStus Prolog is substantially faster. Some of the Prolog benchmark

Re: [Haskell-cafe] Recursion problem in infinite list model

2008-03-28 Thread Hans Aberg
On 28 Mar 2008, at 03:03, Ryan Ingram wrote: Another way to defer the evaluation of the second argument of (-+) is like this: (-+) :: a - List a - List a x -+ y = List(f) where f 0 = x f k = case y of List g - g (k-1) This is exactly what the lazy pattern will do at compile-time. Does

Re: [Haskell-cafe] Wumpus World

2008-03-28 Thread Andrew Butterfield
Benjamin L. Russell wrote: Not all students and researchers can afford a Personal License. Can you recommend an alternative, fast Prolog development system under a free licensing agreement, such as GPL/GLPL? For Mac users, https://www.cs.tcd.ie/open-prolog/ might be worth a look

Re: [Haskell-cafe] Wumpus World

2008-03-28 Thread jerzy . karczmarczuk
Benjamin L. Russell wrote: Not all students and researchers can afford a Personal License. Can you recommend an alternative, fast Prolog development system under a free licensing agreement, such as GPL/GLPL? You have quite a choice if you relax your licensing requirements:

Re: [Haskell-cafe] Sound typeable via type families?

2008-03-28 Thread Wolfgang Jeltsch
Am Freitag, 28. März 2008 05:21 schrieb Dan Doel: […] However, obviously, this depends on overlapping instances (if there's some other way, I'd be happy to know; if type inequality contexts are available, I wasn't able to find them), and I've heard that type families don't play well with

Re: [Haskell-cafe] Wumpus World

2008-03-28 Thread Tom Schrijvers
Not all students and researchers can afford a Personal License. Can you recommend an alternative, fast Prolog development system under a free licensing agreement, such as GPL/GLPL? SWI-Prolog is about the best and most popular open Prolog system: http://www.swi-prolog.org It's not

Re: [Haskell-cafe] Recursion problem in infinite list model

2008-03-28 Thread Hans Aberg
On 28 Mar 2008, at 03:03, Ryan Ingram wrote: Another way to defer the evaluation of the second argument of (-+) is like this: (-+) :: a - List a - List a x -+ y = List(f) where f 0 = x f k = case y of List g - g (k-1) This is exactly what the lazy pattern will do at compile-time. Does

Re: [Haskell-cafe] Recursion problem in infinite list model

2008-03-28 Thread Hans Aberg
I have fixed the problem now. In the last letter, with the Natural class, I had not added instance Num Natural where (N x) - (N y) = N(x - y) which the Ordinal class then in fact has one. Then it turns out that it is merely the fact that show had some cases looking at the list length

Re: [Haskell-cafe] Monad instance for Data.Set, again

2008-03-28 Thread Henning Thielemann
On Fri, 28 Mar 2008, Wolfgang Jeltsch wrote: But it is possible to give a construction of an Ord dictionary from an AssociatedMonad dictionary. See the attached code. It works like a charm. :-) Yeah, type families! In which GHC release they will be included? Sometimes I wonder how many

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Jonathan Cast
On 28 Mar 2008, at 2:02 AM, Paul Keir wrote: Thanks, I'd thought it was something to do with incompatible types. I can now create a simpler problem: tester2 = reserved parameter | symbol : Certainly I could use reserved : instead of symbol, but where is my thinking with symbol here going

[Haskell-cafe] Re: HTTP client libraries

2008-03-28 Thread John Goerzen
On 2008-03-28, Don Stewart [EMAIL PROTECTED] wrote: paulrbrown+haskell-cafe: And we have a curl binding, already in wide use. http://code.haskell.org/curl.git/ a release to hackage is imminent. Do you mean this? http://hackage.haskell.org/cgi-bin/hackage-scripts/package/curl-1.3.1

[Haskell-cafe] Re: HTTP client libraries

2008-03-28 Thread John Goerzen
On 2008-03-27, Adam Langley [EMAIL PROTECTED] wrote: On Thu, Mar 27, 2008 at 12:08 PM, John Goerzen [EMAIL PROTECTED] wrote: * network-minihttp Doesn't appear to actually be very useful as a client. Also, as far as I have been able to deduce, none of these have built-in support for

Re: [Haskell-cafe] Glome raytracer bug: bad output with -O2 -fasm

2008-03-28 Thread Luke Palmer
On Fri, Mar 28, 2008 at 6:28 AM, Jim Snow [EMAIL PROTECTED] wrote: I was trying to get Blinn highlights working with my raytracer, and kept getting ugly artifacts. After trying a bunch of things, I finally compiled without -O2, and the artifacts went away. Here's what I mean:

Re: [Haskell-cafe] Web server libraries

2008-03-28 Thread Sterling Clover
Yipe. It's just been pointed out to me that the hvac repo was missing a key file. I just committed it and tried a fresh pull and build, and it seems to work properly now. Apologies to all who couldn't get it working. Regards, Sterl. On Fri, 28 Mar 2008, Sterling Clover wrote: While hvac, which

Re: [Haskell-cafe] Re: SoC project: Python-Haskell bridge - request for feedback

2008-03-28 Thread Michał Janeczek
On Thu, Mar 27, 2008 at 8:27 PM, John Goerzen [EMAIL PROTECTED] wrote: FWIW, my MissingPy project accomplishes part of this (calling Python from Haskell) already. -- John Yes, MissingPy was mentioned in the original project description, and I have hopes of reusing substantial parts of it.

Re: [Haskell-cafe] MonadMemory class

2008-03-28 Thread Mads Lindstrøm
Hi Ariel J. Birnbaum wrote: Two questions came to mind while thinking of memory references in Haskell: 1. Is there a standard equivalent of the following: class (Monad m) = MonadMemory m r | m - r where new :: a - m (r a) read :: r a - m a write :: r a - a - m () I do not

Re: [Haskell-cafe] compilation succeeds -- execution fails

2008-03-28 Thread Jason Dusek
Thomas Schilling [EMAIL PROTECTED] wrote: Did you try removing all .hi and .o files? Yes. I tried it again this morning, and I've got the same error -- same unknown symbol, c. I don't have trouble with most Haskell programs on my Mac, so I assume it's the way I'm connecting to C that is

Re: [Haskell-cafe] [GSoC] Parallel Benchmarking and Profiling

2008-03-28 Thread Don Stewart
etienne: Hello, I am putting together a student proposal to participate in Google's Summer of Code with one of the following project ideas. Parallel programming benchmarking and benchmark suite - http://hackage.haskell.org/trac/summer-of-code/ticket/1544 Are there open source projects

[Haskell-cafe] [gsoc] mingw64 ghc port

2008-03-28 Thread Bulat Ziganshin
Hello haskell-cafe, it's probably a bit too late, but i recalled that there is one project that will be very useful - it's porting ghc to mingw64 platform, allowing it to generate 64-bit windows platforms. may be someone will find it interesting -- Best regards, Bulat

What Does This Message Mean? (Re: [Haskell-cafe] compilation succeeds -- execution fails)

2008-03-28 Thread Jason Dusek
The message unknown symbol `___stginit_cedictzm0zi1zi1_DataziCharziCEDICTziMatter_' says that it can't find the initializer for` Data.Char.CEDICT.Matter` in `cedict-0.1.1` (this is 'z-encoding', if I remember correctly). So, the odd thing is, that is not the part with the C FFI

Re: What Does This Message Mean? (Re: [Haskell-cafe] compilation succeeds -- execution fails)

2008-03-28 Thread Don Stewart
jason.dusek: The message unknown symbol `___stginit_cedictzm0zi1zi1_DataziCharziCEDICTziMatter_' says that it can't find the initializer for` Data.Char.CEDICT.Matter` in `cedict-0.1.1` (this is 'z-encoding', if I remember correctly). So, the odd thing is, that is not the

RE: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Paul Keir
Could tester2 return some kind of base type, which the two inherit from? I don't know. I'm really only presenting the ugly tester2 function because I'm looking for a Parsec-concordant solution to what appears a simple problem. What I'd like is to parse either the string parameter, or the string

Re: [Haskell-cafe] Sound typeable via type families?

2008-03-28 Thread Dan Doel
On Friday 28 March 2008, Ryan Ingram wrote: This is a really interesting idea. Sadly, I can't think of a way to make it work. The biggest problem is the TEquality class; by putting teq in a typeclass, the decision of which teq to call (and thus, whether or not to return Just Refl or

Re: [Haskell-cafe] Monad instance for Data.Set, again

2008-03-28 Thread Ganesh Sittampalam
On Fri, 28 Mar 2008, Wolfgang Jeltsch wrote: But it is possible to give a construction of an Ord dictionary from an AssociatedMonad dictionary. See the attached code. It works like a charm. :-) This is really cool, and with much wider applicability than restricted monads; it gives us a

Re: [Haskell-cafe] Monad instance for Data.Set, again

2008-03-28 Thread Dan Weston
I'm having trouble embedding unconstrained monads into the NewMonad: {-# LANGUAGE ...,UndecidableInstances #-} instance Monad m = Suitable m v where data Constraints m v = NoConstraints constraints _= NoConstraints instance Monad m = NewMonad m where newReturn =

Re: [Haskell-cafe] Glome raytracer bug: bad output with -O2 -fasm

2008-03-28 Thread Jim Snow
Luke Palmer wrote: On Fri, Mar 28, 2008 at 6:28 AM, Jim Snow [EMAIL PROTECTED] wrote: I was trying to get Blinn highlights working with my raytracer, and kept getting ugly artifacts. After trying a bunch of things, I finally compiled without -O2, and the artifacts went away. Here's what

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Ryan Ingram
On 3/28/08, Paul Keir [EMAIL PROTECTED] wrote: What I'd like is to parse either the string parameter, or the string :. I'm using 'reserved' and 'symbol' because they seem to correspond well to the concepts in the language I'm parsing. I could try, tester3 = reserved parameter | do { symbol :;

Re: [Haskell-cafe] Monad instance for Data.Set, again

2008-03-28 Thread Ryan Ingram
On 3/28/08, Dan Weston [EMAIL PROTECTED] wrote: I'm having trouble embedding unconstrained monads into the NewMonad: Is there some trick (e.g. newtype boxing/unboxing) to get all the unconstrained monads automatically instanced? Then the do notation could be presumably remapped to the new

Re: [Haskell-cafe] Parsec Expected Type

2008-03-28 Thread Brandon S. Allbery KF8NH
On Mar 28, 2008, at 21:12 , Ryan Ingram wrote: On 3/28/08, Paul Keir [EMAIL PROTECTED] wrote: What I'd like is to parse either the string parameter, or the string :. I'm using 'reserved' and 'symbol' because they seem to correspond well to the concepts in the language I'm parsing. I could