Re: [GHC] #2013: ghci crash on startup: R_X86_64_32S relocation out of range.

2008-01-09 Thread GHC
#2013: ghci crash on startup: R_X86_64_32S relocation out of range. -+-- Reporter: mboes| Owner: Type: bug | Status: new Priority: normal | Milestone:

Re: [GHC] #2022: DLL support broken

2008-01-09 Thread GHC
#2022: DLL support broken --+- Reporter: mte | Owner: Type: bug | Status: new Priority: normal| Milestone: Component: Compiler |Version: 6.8.2

[GHC] #2028: STM slightly conservative on write-only transactions

2008-01-09 Thread GHC
#2028: STM slightly conservative on write-only transactions --+- Reporter: JulesBean | Owner: Type: proposal | Status: new Priority: normal | Milestone:

[GHC] #2029: Add --with-libedit flag to the readline package

2008-01-09 Thread GHC
#2029: Add --with-libedit flag to the readline package --+- Reporter: judah | Owner: Type: proposal | Status: new Priority: normal | Milestone:

[GHC] #2030: GHC internal error: `m' is not in scope

2008-01-09 Thread GHC
#2030: GHC internal error: `m' is not in scope ---+ Reporter: ToRA| Owner: Type: bug | Status: new Priority: normal | Milestone: Component:

Re: [GHC] #2030: GHC internal error: `m' is not in scope

2008-01-09 Thread GHC
#2030: GHC internal error: `m' is not in scope --+- Reporter: ToRA | Owner: Type: bug | Status: new Priority: normal| Milestone:

Re: [GHC] #2030: GHC internal error: `m' is not in scope

2008-01-09 Thread GHC
#2030: GHC internal error: `m' is not in scope --+- Reporter: ToRA | Owner: Type: bug | Status: new Priority: normal| Milestone:

Re: [GHC] #2030: GHC internal error: `m' is not in scope

2008-01-09 Thread GHC
#2030: GHC internal error: `m' is not in scope -+-- Reporter: ToRA | Owner: Type: bug | Status: new Priority: normal

Re: [GHC] #2029: Add --with-libedit flag to the readline package

2008-01-09 Thread GHC
#2029: Add --with-libedit flag to the readline package ---+ Reporter: judah | Owner: Type: proposal | Status: new Priority: normal | Milestone:

Re: [GHC] #2013: ghci crash on startup: R_X86_64_32S relocation out of range.

2008-01-09 Thread GHC
#2013: ghci crash on startup: R_X86_64_32S relocation out of range. -+-- Reporter: mboes| Owner: Type: bug | Status: new Priority: normal | Milestone:

Re: Maps, was Re: GHC source code improvement ideas

2008-01-09 Thread Adrian Hey
Wolfgang Jeltsch wrote: Am Sonntag, 6. Januar 2008 13:37 schrieb Adrian Hey: It's the GT class here.. Short remark: Wouldn’t a longer, more descriptive identifier be better? Like GeeTee maybe? or even GeneralisedTrie? I like short names myself. But as I have stopped work on this particular

Re: readline package with libedit

2008-01-09 Thread Christian Maeder
Good! By the way I've the following lines in my ~/.ghci from http://hackage.haskell.org/trac/ghc/ticket/998 :m +System.Console.Readline Data.List getCompleterWordBreakCharacters = setCompleterWordBreakCharacters . Data.List.delete '/' :m -System.Console.Readline Data.List Does this work with

Re: darcs patch: [PROOF OF CONCEPT] build readline package with libedit

2008-01-09 Thread Christian Maeder
Judah Jacobson wrote: I'll work on making a new patch which adds back all of the functionality that libedit supports (including what's needed for shellac-readline). Let me again stress, that we should make all options work and let us or others decide later on, which option is best for them or

Re: bindist for Intel MacOS X 10.4 (Tiger) with static libs

2008-01-09 Thread Christian Maeder
Christian Maeder wrote: I've succeeded in building a binary distribution that uses static libraries for gmp and readline. libreadline.a, libncurses.a and libgmp.a with corresponding header files are included. (For license issues ask someone else.) Linking is done using the flag

Re: readline package with libedit

2008-01-09 Thread Judah Jacobson
On Jan 9, 2008 12:59 AM, Christian Maeder [EMAIL PROTECTED] wrote: By the way I've the following lines in my ~/.ghci from http://hackage.haskell.org/trac/ghc/ticket/998 :m +System.Console.Readline Data.List getCompleterWordBreakCharacters = setCompleterWordBreakCharacters .

Problem building on NetBSD Alpha - Dynamic link dependency?

2008-01-09 Thread jim burton
I'm trying to build unregistered 6.8.2 on NetBSD Alpha 2.1.0_STABLE -- I have the following problem which seems to be same as this one - http://hackage.haskell.org/trac/ghc/ticket/1860 $ ./configure --enable-hc-boot --enable-hc-boot-unregistered checking build system type...

Re: Problem building on NetBSD Alpha - Dynamic link dependency?

2008-01-09 Thread Matthias Kilian
On Wed, Jan 09, 2008 at 07:42:21PM +, jim burton wrote: I'm trying to build unregistered 6.8.2 on NetBSD Alpha 2.1.0_STABLE -- I have the following problem which seems to be same as this one - http://hackage.haskell.org/trac/ghc/ticket/1860 No, I think it's another problem. $

Re: problem with GHC installaion on x86_64

2008-01-09 Thread Yu Di
Hi, I found that the x86_64 binary package for version 6.4.1 can be installed successfully on my machine (the x86_64 builds for higher versions either require libreadline.so.5 or have problems with timer_create), and then I tried to use that to compile 6.8.2 from source, but I got the following

Re: readline package with libedit

2008-01-09 Thread Manuel M T Chakravarty
Judah, I completely agree that, at the least on the Mac, using editline is the best solution (as long all necessary functionality is supported). I am wondering, though, whether you are testing on Tiger or Leopard. When looking at the readline-emulation API of editline after upgrading to

Re: Problem building on NetBSD Alpha - Dynamic link dependency?

2008-01-09 Thread jim burton
Thanks for that, the configure script gets to the end with that help. Following the instructions at http://hackage.haskell.org/trac/ghc/wiki/Building/Porting#PortingGHCtoanewplatform , I then try to make includes but get a big stream of errors from make. Why is this? $ cd includes $ make

Re: readline package with libedit

2008-01-09 Thread Judah Jacobson
Good point. Fortunately, I'm testing everything on Tiger (10.4.10), so this shouldn't be a problem. -Judah On Jan 9, 2008 2:13 PM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Judah, I completely agree that, at the least on the Mac, using editline is the best solution (as long all

RE: [Haskell] 2nd ANNOUNCE: HCAR 12/2007

2008-01-09 Thread Simon Peyton-Jones
Thank you Andres! As always it's amazing how much is going on in Haskell land, and running the Haskell Communities and Activities Report is a real service to our community. You are a star. Everyone else: I see that Andres would like to hand on the HCAR editor-ship to someone else. Get in

[Haskell] MSFP call for papers

2008-01-09 Thread Venanzio Capretta
CALL FOR PAPERS Second Workshop on MATHEMATICALLY STRUCTURED FUNCTIONAL PROGRAMMING 6 July 2008, Reykjavik - Iceland A satellite workshop of ICALP 2008 PRESENTATION The workshop on Mathematically Structured Functional Programming is devoted to the derivation of functionality from structure.

Re: [Haskell] ANNOUNCE: Haddock version 2.0.0.0

2008-01-09 Thread Simon Marlow
Felipe Lessa wrote: On Jan 8, 2008 10:28 AM, David Waern [EMAIL PROTECTED] wrote: * Haddock now understands all syntax understood by GHC 6.8.2 Does Haddock still define __HADDOCK__? There's a lot of code that uses this flag just to hide something Haddock didn't know. Haddock itself never

[Haskell] detecting existing instances

2008-01-09 Thread Jorge Marques Pelizzoni
Hi, all! I guess this belongs to haskell-cafe or glasgow-haskell-users, but I've already been there and got no replies. Thanks in advance for anyone taking the time to read on. Given two type classes A t and B t, I'd like the typechecker to derive different A t instances depending exactly on

Re: [Haskell] ANNOUNCE: Haddock version 2.0.0.0

2008-01-09 Thread Felipe Lessa
Now I see. Thanks David and Simon for the clarifications! =) -- Felipe. ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] detecting existing instances

2008-01-09 Thread Taral
On 1/9/08, Jorge Marques Pelizzoni [EMAIL PROTECTED] wrote: Given two type classes A t and B t, I'd like the typechecker to derive different A t instances depending exactly on whether t is an instance of B. I think this would require some kind of whole-program analysis. While Haskell provides

Re: [Haskell] detecting existing instances

2008-01-09 Thread Ralf Laemmel
Given two type classes A t and B t, I'd like the typechecker to derive different A t instances depending exactly on whether t is an instance of B. In other words, is it possible to define a class (actually a type-level function) IsB t f such that: A GHC-like type system is in principle

Re: [Haskell] detecting existing instances

2008-01-09 Thread Jorge Marques Pelizzoni
Thank you very much, Ralf, for your very thorough reply. That's a very general way to deal with the issue. It never occurred to me that the inspected class itself might carry the availability info. Cheers, Jorge. Ralf Laemmel escreveu: Given two type classes A t and B t, I'd like the

Re: [Haskell] detecting existing instances

2008-01-09 Thread David Menendez
On Jan 9, 2008 3:10 PM, Ralf Laemmel [EMAIL PROTECTED] wrote: Type-level type cast is the type-level programmer's swiss army knife. See the illustration below. Does this get any easier with type families? Your (TypeCast a b) seems similar in intent to (a ~ b), but I'm not familiar enough

Re: [Haskell-cafe] ANN: A triple of new packages for talking to the outside world

2008-01-09 Thread Don Stewart
bos: Adam Langley wrote: Ok, see http://www.imperialviolet.org/IncrementalGet.hs That's excellent! This is just the sort of thing one wants if getting dribs and drabs of information instead of a steady stream. For example, I need to reconstruct TCP streams from individual packets

Re: [Haskell-cafe] US Homeland Security program language security risks

2008-01-09 Thread Yitzchak Gale
Galchin Vasili wrote on Friday, January 4: I stumbled across this page. It seems that Haskell and other strongly typed functional languages like Ml/OCaml will fare much, much better, e.g. buffer overrun. Thoughts . comments. Bulat Ziganshin wrote: for me, it looks like saying that

[Haskell-cafe] Re: ANN: A triple of new packages for talking to the outside world

2008-01-09 Thread Dominic Steinitz
Adam Langley agl at imperialviolet.org writes: But if this is useful to you, make any requests. I'll (hopefully) do them, clean it up and push a new release of binary-strict. How difficult would it be to have a getBits functions as well as a getBytes? That would allow me drop the dependency

Re: [Haskell-cafe] Currying and Partial Evaluation

2008-01-09 Thread Jules Bean
Fernando Rodriguez wrote: Hi, Is currying in Haskell the same thing as Partial Evaluation (http://en.wikipedia.org/wiki/Partial_evaluation)? Am I getting partial evaluation for free just by using Haskell? Thanks! I'm not sure you got a straight answer, although you provoked some

[Haskell-cafe] Re: Currying and Partial Evaluation

2008-01-09 Thread Fernando Rodriguez
Hello Jules, I'm not sure you got a straight answer, although you provoked some discussion. Thanks for your answer, now everything is much clearer. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Type System (Was: Currying and Partial Evaluation)

2008-01-09 Thread Felipe Lessa
On Jan 9, 2008 12:39 AM, Achim Schneider [EMAIL PROTECTED] wrote: Yes, exactly that wire which isn't obscured by the boiler plate has kindled my interest. The name of a type variable doesn't really matter. GHC tries to preserve the names you give, otherwise it creates their own. For example,

[Haskell-cafe] Re: Currying and Partial Evaluation

2008-01-09 Thread Achim Schneider
Derek Elkins [EMAIL PROTECTED] wrote: Can we stop using confusing, misleading or outright wrong definitions and analogies? No, we can't, ever, that's plain impossible. And will never stop to use enlightening, inspiring or vastly approximate or aggregate definitions and analogies, and I won't

[Haskell-cafe] Re: PROPOSAL: Some more 'Applicative' combinators

2008-01-09 Thread apfelmus
Sterling Clover wrote: The more general question, which stems from a certain degree of ignorance on my part, is what uses folks have found for Alternative at all outside of parsing. Alternative is the generalization of MonadPlus, so empty and | are useful for lists and Maybe at least.

Re: Fusion vs. inlining (Was: [Haskell-cafe] Fusion of lists and chunky sequences)

2008-01-09 Thread Henning Thielemann
On Tue, 8 Jan 2008, Roman Leshchinskiy wrote: Henning Thielemann wrote: Anyway, I tried to wrap Prelude lists in a newtype and thus got GHC (still 6.4.1) to invoke my rules instead of the Prelude rules. But I encountered the following problem: I define something like nonFusable x

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haddock version 2.0.0.0

2008-01-09 Thread Simon Marlow
Felipe Lessa wrote: On Jan 8, 2008 10:28 AM, David Waern [EMAIL PROTECTED] wrote: * Haddock now understands all syntax understood by GHC 6.8.2 Does Haddock still define __HADDOCK__? There's a lot of code that uses this flag just to hide something Haddock didn't know. Haddock itself never

Re: [Haskell-cafe] Trouble with indentation

2008-01-09 Thread Dougal Stanton
On 09/01/2008, Fernando Rodriguez [EMAIL PROTECTED] wrote: However, ghc complains about: parse error on input `=' at the if m = 2 then line. I believe this is some sort of layout error. Can someone point out what I am doing wrong? Assuming the layout didn't get munged during the email

[Haskell-cafe] Trouble with indentation

2008-01-09 Thread Fernando Rodriguez
Hi, I'm trying to write a function that finds out the week day using the Zeller congruence (http://en.wikipedia.org/wiki/Zeller's_congruence). However, ghc complains about: parse error on input `=' at the if m = 2 then line. I believe this is some sort of layout error. Can someone point

Re: [Haskell-cafe] Re: Is there anyone out there who can translate C# generics into Haskell?

2008-01-09 Thread Jules Bean
Achim Schneider wrote: Yes, you see, that was my first Haskell program bigger than 20 lines, there's no possibility to get the state out of the IO Monad, at least without writing a high-level interface to glut and gl, and then there's this thing that _every_ game works with input callbacks, one,

Re: [Haskell-cafe] Trouble with indentation

2008-01-09 Thread Jules Bean
Fernando Rodriguez wrote: Hi, I'm trying to write a function that finds out the week day using the Zeller congruence (http://en.wikipedia.org/wiki/Zeller's_congruence). However, ghc complains about: parse error on input `=' at the if m = 2 then line. I believe this is some sort of layout

[Haskell-cafe] Data.Binary and serialising doubles in IEEE format

2008-01-09 Thread allan
Dear all I have what I think should be a relatively simple problem: I have a C program which reads in data from a binary file, it is a specific format so it knows that there are 3 integers followed by three doubles or whatever. So I'm trying to serialise the data from within a Haskell program

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking to the outside world

2008-01-09 Thread Duncan Coutts
On Wed, 2008-01-09 at 09:26 +, Dominic Steinitz wrote: Adam Langley agl at imperialviolet.org writes: But if this is useful to you, make any requests. I'll (hopefully) do them, clean it up and push a new release of binary-strict. How difficult would it be to have a getBits

[Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Yu-Teh Shen
I got question about why haskell insist to be a purely FL. I mean is there any feature which is only support by pure? I mean maybe the program is much easier to prove? Or maybe we can cache some value for laziness. Could anyone give me some more information about why haskell needs to be pure.

[Haskell-cafe] Re: Why purely in haskell?

2008-01-09 Thread Achim Schneider
Yu-Teh Shen [EMAIL PROTECTED] wrote: I got question about why haskell insist to be a purely FL. I mean is there any feature which is only support by pure? I mean maybe the program is much easier to prove? Or maybe we can cache some value for laziness. Could anyone give me some more

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Dougal Stanton
On 09/01/2008, Yu-Teh Shen [EMAIL PROTECTED] wrote: I got question about why haskell insist to be a purely FL. I mean is there any feature which is only support by pure? Have a look at the ueber-retrospective on Haskell, fifty-five pages of all the history and motivation one could possibly

[Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread Dominic Steinitz
Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: On Wed, 2008-01-09 at 09:26 +, Dominic Steinitz wrote: Adam Langley agl at imperialviolet.org writes: But if this is useful to you, make any requests. I'll (hopefully) do them, clean it up and push a new release of

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Mattias Bengtsson
On Wed, 2008-01-09 at 15:06 +, Dougal Stanton wrote: Have a look at the ueber-retrospective on Haskell, fifty-five pages of all the history and motivation one could possibly want. http://research.microsoft.com/~simonpj/papers/history-of-haskell/ It's interesting reading, I promise! ;-)

[Haskell-cafe] Silly question: accessing a slot in a data type

2008-01-09 Thread Fernando Rodriguez
Hi, I'm writing a very simple address book. I defined the follwoing types for Contact and AddressBook: type Name= String type PhoneNumber= Integer data Contact = Contact {name :: Name, phone:: PhoneNumber} deriving Show -- The addressBook is a lista of Contacts data AddressBook=

[Haskell-cafe] Re: Silly question: accessing a slot in a data type

2008-01-09 Thread Achim Schneider
Fernando Rodriguez [EMAIL PROTECTED] wrote: Hi, I'm writing a very simple address book. I defined the follwoing types for Contact and AddressBook: type Name= String type PhoneNumber= Integer data Contact = Contact {name :: Name, phone:: PhoneNumber} deriving Show -- The

[Haskell-cafe] Re: Silly question: accessing a slot in a data type

2008-01-09 Thread Achim Schneider
Fernando Rodriguez [EMAIL PROTECTED] wrote: Hi, I'm writing a very simple address book. I defined the follwoing types for Contact and AddressBook: type Name= String type PhoneNumber= Integer data Contact = Contact {name :: Name, phone:: PhoneNumber} deriving Show -- The

Re: [Haskell-cafe] US Homeland Security program language security risks

2008-01-09 Thread Bryan O'Sullivan
Yitzchak Gale wrote: Perhaps Coverity's interest could be piqued if they were made aware of Haskell's emergence as an important platform in security-sensitive industries such as finance and chip design, and of the significant influence that Haskell is having on the design of all other major

[Haskell-cafe] GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Peter Verswyvelen
I while I ago I sent an email regarding hs-plugins not working on windows. I now tried to directly use GHC API, but I also failed. The following program (which might be buggy, I copy/pasted from various sources) import DynFlags import GHC main = defaultErrorHandler defaultDynFlags $ do

Re: [Haskell-cafe] GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread gwern0
On 2008.01.09 17:07:46 +0100, Peter Verswyvelen [EMAIL PROTECTED] scribbled 4.7K characters: I while I ago I sent an email regarding hs-plugins not working on windows. I now tried to directly use GHC API, but I also failed. The following program (which might be buggy, I copy/pasted

[Haskell-cafe] Re: [Haskell] ANNOUNCE: Haddock version 2.0.0.0

2008-01-09 Thread Felipe Lessa
Now I see. Thanks David and Simon for the clarifications! =) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] US Homeland Security program language security risks

2008-01-09 Thread Isaac Dupree
Bryan O'Sullivan wrote: Yitzchak Gale wrote: Perhaps Coverity's interest could be piqued if they were made aware of Haskell's emergence as an important platform in security-sensitive industries such as finance and chip design, and of the significant influence that Haskell is having on the

Re: [Haskell-cafe] GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Peter Verswyvelen
[EMAIL PROTECTED] wrote: I think your installation is just buggy. I ran it here, and it compiles fine (although it doesn't run, as Linux obviously has d:/app/ghc-6.8.2) and runs, printing 4 if I replace the string with /usr/lib/ghc-6.8.2. Could it be that your GHCi is not the 6.8.2 one, or

[Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Cetin Sert
I want to design a DSL in Haskell for propositional calculus. But instead of using natural language names for functions like or, and, implies etc. I want to use Unicode symbols as infix functions ¬, ˅, ˄, →, ↔ But I keep getting error messages from the GHC parser. Is there a way to make GHC

Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Don Stewart
cetin.sert: I want to design a DSL in Haskell for propositional calculus. But instead of using natural language names for functions like or, and, implies etc. I want to use Unicode symbols as infix functions NOT, *, *, -, - But I keep getting error messages from the GHC parser. Is

Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Felipe Lessa
On Jan 9, 2008 3:17 PM, Cetin Sert [EMAIL PROTECTED] wrote: I want to design a DSL in Haskell for propositional calculus. But instead of using natural language names for functions like or, and, implies etc. I want to use Unicode symbols as infix functions ¬, ˅, ˄, →, ↔ I guess you can't do

Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Tristan Allwood
Hi, Attached works fine for me (ghc 6.8.2) You'll have trouble with → though, as ghc steals that symbol for type signature declarations. A ghc expert could probably shed more light; Cheers, Tris GHCi also doesn't (at least for me) print symbol names correctly, but that's a different issue.

RE: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Cetin Sert
Neither appending {-# OPTIONS_GHC -fglasgow-exts -xunicodesyntax #-} at the beginning of a .hs source file in Visual Haskell nor setting the ghc options from the project properties seems to solve the problem. I keep getting Error 1 lexical error (UTF-8 decoding error)

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Derek Elkins
On Wed, 2008-01-09 at 15:06 +, Dougal Stanton wrote: On 09/01/2008, Yu-Teh Shen [EMAIL PROTECTED] wrote: I got question about why haskell insist to be a purely FL. I mean is there any feature which is only support by pure? Have a look at the ueber-retrospective on Haskell, fifty-five

Re: [Haskell-cafe] Silly question: accessing a slot in a data type

2008-01-09 Thread Miguel Mitrofanov
Also, how do I represent an AddressBook with an empty list and one with data on its list for my pattern matching? phoneLookup (AddressBook []) = Nothing ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Trouble with function with two clauses

2008-01-09 Thread Fernando Rodriguez
Hi, I have the following type and function: data ConsCell a = Nil | Cons a (ConsCell a) deriving Show head' Nil = Nothing head' (Cons a _) = Just a Works fine, however, what's wrong with the following function? head'' | Nil = Nothing | Cons a _ = Just a Thanks!

[Haskell-cafe] Re: Silly question: accessing a slot in a data type

2008-01-09 Thread Fernando Rodriguez
Hello Miguel, Also, how do I represent an AddressBook with an empty list and one with data on its list for my pattern matching? phoneLookup (AddressBook []) = Nothing Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Trouble with function with two clauses

2008-01-09 Thread Fraser Wilson
In head'', what is being compared to Nil? The guards of a function are a series of Boolean expressions; but in your example they are of type ConsCell a. The difference is that in a pattern, the structure of the argument is matched; in a guard, an arbitrary expression is evaluated. I have always

Re: [Haskell-cafe] Trouble with function with two clauses

2008-01-09 Thread gwern0
On 2008.01.09 18:15:33 +, Fernando Rodriguez [EMAIL PROTECTED] scribbled 0.3K characters: Hi, I have the following type and function: data ConsCell a = Nil | Cons a (ConsCell a) deriving Show head' Nil = Nothing head' (Cons a _) = Just a Works fine, however, what's wrong with the

Re: [Haskell-cafe] Re: US Homeland Security program language security risks

2008-01-09 Thread Seth Gordon
Daniel Fischer wrote: Am Sonntag, 6. Januar 2008 15:54 schrieb Achim Schneider: That's an interesting task: Design a non-touring complete, restricted language in which every expression is decidable, without making the language unusable for usual programming problems. I'm not a logician, but

Re: [Haskell-cafe] Trouble with function with two clauses

2008-01-09 Thread Henning Thielemann
On Wed, 9 Jan 2008, Fernando Rodriguez wrote: I have the following type and function: data ConsCell a = Nil | Cons a (ConsCell a) deriving Show head' Nil = Nothing head' (Cons a _) = Just a Works fine, however, what's wrong with the following function? head'' | Nil = Nothing

Re: [Haskell-cafe] GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Attila Babo
Using ghci your code is fine under Linux, but fails on Windows, even with a daily snapshot from today. It's OK when compiling with ghc on both platforms. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Peter Verswyvelen
Derek Elkins wrote: A shorter and lighter and and also interesting and entertaining read is: http://research.microsoft.com/~simonpj/Papers/haskell-retrospective/index.htm Just read it, quoting: `Tony Hoare’s comment: “I fear that Haskell is doomed to succeed”` LOL! Very good stuff If

[Haskell-cafe] Re: GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Achim Schneider
Attila Babo [EMAIL PROTECTED] wrote: Using ghci your code is fine under Linux, but fails on Windows, even with a daily snapshot from today. It's OK when compiling with ghc on both platforms. I think it is time for peter to become acquainted with the readline package and write a custom repl.

Re: [Haskell-cafe] GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Austin Seipp
Excerpts from Peter Verswyvelen's message of Wed Jan 09 10:07:46 -0600 2008: Is my code incorrect, or is this a (known?) bug in GHC 6.8.2 on Windows? I haven't tried the Linux version yet. The same thing happens on my Windows XP box as it does with yours. On both windows and my linux box, ghc

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Anton van Straaten
Peter Verswyvelen wrote: But I'm amazed that impure (albeit strong) languages like LISP and Scheme are still used for projects... I mean, in Scheme you can set! the addition operator to become a multiplication operator at runtime, modifying global behavior... Now that's a side effect, C/C++ is

[Haskell-cafe] Re: Difference lists and ShowS

2008-01-09 Thread apfelmus
Albert Y. C. Lai wrote: apfelmus wrote: I don't know a formalism for easy reasoning about time in a lazy language. Anyone any pointers? Note that the problem is already present for difference lists in strict languages. http://homepages.inf.ed.ac.uk/wadler/topics/strictness-analysis.html

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Don Stewart
anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the downside can be vanishingly small. It can be small, unless you need to have any kind of static assurance (say for

Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Wolfgang Jeltsch
Am Mittwoch, 9. Januar 2008 18:34 schrieb Cetin Sert: Neither appending {-# OPTIONS_GHC -fglasgow-exts -xunicodesyntax #-} First, I think, you have to use -XUnicodeSyntax (as Don said), and not -xunicodesyntax. Second, -XUnicodeSyntax only enables alternative notation for certain built-in

RE: [Haskell-cafe] Re: GHC 6.8.2 as a library on Windows and GHCi

2008-01-09 Thread Peter Verswyvelen
I think it is time for peter to become acquainted with the readline package and write a custom repl. No no, I already did that, a long time ago, in 68000 assembly :) Or just copy half of ghci into a module and call it. I'm just interested in seeing if the interpreter/compiler/linker

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Anton van Straaten
Don Stewart wrote: anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the downside can be vanishingly small. It can be small, unless you need to have any kind of static

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread David Roundy
On Jan 9, 2008 4:21 PM, Don Stewart [EMAIL PROTECTED] wrote: anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the downside can be vanishingly small. It can be

Re: [Haskell-cafe] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-09 Thread Wolfgang Jeltsch
Am Mittwoch, 9. Januar 2008 18:24 schrieb Felipe Lessa: […] But for the others, what is wrong with e.g. (\/), (/\), (--) and (-)? These are not the true symbols. They look ugly compared to the real ones. Nice typography is a great thing! You could write things like 'a /\ b -- c'. With

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread David Roundy
On Jan 9, 2008 10:10 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: The difficulty is in deciding what the api should be. Does it give you a real bitstream or only a byte aligned one? If I ask for 3 bits then 15 bytes what does it do? Does

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Henning Thielemann
On Wed, 9 Jan 2008, David Roundy wrote: On Jan 9, 2008 4:21 PM, Don Stewart [EMAIL PROTECTED] wrote: anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the

[Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread Achim Schneider
David Roundy [EMAIL PROTECTED] wrote: On Jan 9, 2008 10:10 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: The difficulty is in deciding what the api should be. Does it give you a real bitstream or only a byte aligned one? If I ask

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Don Stewart
anton: Don Stewart wrote: anton: OTOH, the freedom to change things on the fly can be nice to have, and if used with great responsibility (mainly an understanding of what's safe to do and what isn't), the downside can be vanishingly small. It can be small, unless you need to have any

[Haskell-cafe] Tim Sweeney (the gamer)

2008-01-09 Thread Galchin Vasili
Hello, I have been reading with great interested Tim Sweeney's slides on the Next Generation Programming Language. Does anybody know his email address? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Tim Sweeney (the gamer)

2008-01-09 Thread J. Garrett Morris
I imagine you can get in touch with him through Epic (www.epicgames.com) if you can't find another way to contact him. /g On Jan 9, 2008 4:21 PM, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, I have been reading with great interested Tim Sweeney's slides on the Next Generation

Re: [Haskell-cafe] Why purely in haskell?

2008-01-09 Thread Graham Fawcett
On Jan 9, 2008 6:20 PM, Don Stewart [EMAIL PROTECTED] wrote: anton: Oh dear - I'm going to have to rethink the paper I was working on, provisionally titled In defense of arbitrary untracked effects in high assurance software. ;) That would be an awesome paper :) Hear, hear! Anton, if

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread David Roundy
On Wed, Jan 09, 2008 at 11:43:52PM +0100, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: On Jan 9, 2008 10:10 AM, Dominic Steinitz [EMAIL PROTECTED] wrote: Duncan Coutts duncan.coutts at worc.ox.ac.uk writes: The difficulty is in deciding what the api should be. Does it

Re: [Haskell-cafe] Data.Binary and serialising doubles in IEEE format

2008-01-09 Thread Adam Langley
On Jan 9, 2008 5:18 AM, allan [EMAIL PROTECTED] wrote: Essentially then, is there anyone that can write my 'putDouble' function or give some hint as to how I might do it. For the moment assume that I'm not really concerned with portability across platforms at least for the time being (I

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread Adam Langley
On Jan 9, 2008 5:01 PM, David Roundy [EMAIL PROTECTED] wrote: But I can't imagine an implementation in which this change wouldn't slow down getBytes for the normal case. Perhaps the slowdown would be small, but it seems unwise to enforce that slowness at the API level, when we've already got

Re: [Haskell-cafe] Re: Displaying # of reductions after eachcomputation in ghci?

2008-01-09 Thread Lennart Augustsson
What is a reduction anyway? On Jan 8, 2008 2:48 PM, Fernando Rodriguez [EMAIL PROTECTED] wrote: Hello Stefan O'Rear, No. (rambling explanation snipped awaiting further request) Stefan OK, I'll take the bait: why not? ___

[Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-09 Thread Achim Schneider
David Roundy [EMAIL PROTECTED] wrote: [ something that every C programmer dreams of ] I'm not going to answer, I'd be just vapour-waring around. But, yes, any-alignment any-granularity reads can be done in O(1), with 1 ranging from case to case from one instruction to a few shifts and 's, plus

[Haskell-cafe] Re: Displaying # of reductions after eachcomputation in ghci?

2008-01-09 Thread Achim Schneider
Lennart Augustsson [EMAIL PROTECTED] wrote: What is a reduction anyway? () - o - . - -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved. Unauthorised copying, hiring, renting, public performance and/or

[Haskell-cafe] Comments and suggestions on code

2008-01-09 Thread Andre Nathan
Hello I've just found time to finish writing my first real world program, so I thought I'd post it here and ask for insight on general issues such as if there's anything that isn't done the Haskell way, or if there's something that could be done more efficiently. The code is at the bottom of

Re: [Haskell-cafe] Comments and suggestions on code

2008-01-09 Thread Jonathan Cast
On 9 Jan 2008, at 7:57 PM, Andre Nathan wrote: Hello I've just found time to finish writing my first real world program, so I thought I'd post it here and ask for insight on general issues such as if there's anything that isn't done the Haskell way, or if there's something that could be

  1   2   >