[Haskell-cafe] RE: No warning in GHC

2010-03-22 Thread Simon Peyton-Jones
[Redirecting to haskell-cafe] Try http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id2959068 With -Wall I get bash-3.2$ ghc -c -Wall Foo.hs Foo.hs:3:0: Warning: Definition but no type signature for `func' Inferred type: func :: forall t t1. (Num t1)

Re: [Haskell-cafe] Re: Occurs check error, help!

2010-03-22 Thread Daniel Fischer
-Ursprüngliche Nachricht- Von: adamtheturtle kill2thr...@hotmail.com Gesendet: 22.03.2010 04:52:19 An: haskell-cafe@haskell.org Betreff: [Haskell-cafe] Re: Occurs check error, help! Ivan Miljenovic ivan.miljenovic [ gmail.com writes: Since my answer before to your question obviously

[Haskell-cafe] Re: Strange typing?

2010-03-22 Thread Gleb Alexeyev
Ozgur Akgun wrote: Is there any way to limit a functions type, not by a data type but by a group of constructors of a data type? If not, what would be the *right* thing to do to achieve this level of type safety? data DT1 = X | Y | Z data DT2 = A | B | C | D func1 :: DT1 - DT2 -- instead of

[Haskell-cafe] breadth first search one-liner?

2010-03-22 Thread Johannes Waldmann
Dear all, there is this neat one-line BFS implementation bfs :: Eq a = ( a - [a] ) - a - [a] bfs next start = let xs = nub $ start : ( xs = next ) in xs but it has a problem: it only works for infinite graphs. This is fine: take 20 $ bfs ( \ x - [2*x, x+1] ) 1 but this is not:

Re: [Haskell-cafe] breadth first search one-liner?

2010-03-22 Thread Ross Paterson
On Mon, Mar 22, 2010 at 11:02:32AM +0100, Johannes Waldmann wrote: Dear all, there is this neat one-line BFS implementation bfs :: Eq a = ( a - [a] ) - a - [a] bfs next start = let xs = nub $ start : ( xs = next ) in xs but it has a problem: it only works for infinite

[Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Johannes Waldmann
Nice! - Where's the 'nub'? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] ANNOUNCE: AusHac2010

2010-03-22 Thread Ivan Lazar Miljenovic
Dreading the end of ZuriHac? Wish the Haskellian camaraderie could continue? Well, if you're able to make your way to Sydney, Australia between the 16th and 18th of July, then AusHac2010 is for _you_! It will be held at the School of Computer Science and Engineering at the University of New

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Ross Paterson
On Mon, Mar 22, 2010 at 10:30:32AM +, Johannes Waldmann wrote: Nice! - Where's the 'nub'? A bit longer: bfs :: Eq a = (a - [a]) - a - [a] bfs f s = concat $ takeWhile (not . null) $ map snd $ iterate step ([], [s]) where step (seen, xs) = let seen' = xs++seen in (seen', nub $ [y | x - xs,

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Ross Paterson
A bit closer to the original: bfs :: Eq a = (a - [a]) - a - [a] bfs f s = concat $ takeWhile (not . null) levels where levels = foldr trim [] $ [s] : map (nub . (= f)) levels trim xs xss = xs : map (\\ xs) xss ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Bertram Felgenhauer
Ross Paterson wrote: On Mon, Mar 22, 2010 at 10:30:32AM +, Johannes Waldmann wrote: Nice! - Where's the 'nub'? A bit longer: bfs :: Eq a = (a - [a]) - a - [a] bfs f s = concat $ takeWhile (not . null) $ map snd $ iterate step ([], [s]) where step (seen, xs) = let seen' = xs++seen

[Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Johann Höchtl
Hello, I was recentyl playing with Haskell (GHC that is) IO and text processing. Bytestrings and Lazy Bytestrings allow for fast and memory eficient string (well, bytestring) handling, yet a lot of libraries do not support them (yet) Given the incredibly inneficient memory representation of

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Ivan Lazar Miljenovic
Johann Höchtl johann.hoec...@gmail.com writes: Bytestrings and Lazy Bytestrings allow for fast and memory eficient string (well, bytestring) handling, yet a lot of libraries do not support them (yet) WHat do you mean? A lot of libraries need to use String because it's easier to deal with and

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Johan Tibell
On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com wrote: My question or discussion point: Why not depreciate [Char] altogether and favour of lazy Bytestrings? A sequence of bytes is not the same thing as a sequence of Unicode code points. If you want to replace String by

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Ivan Miljenovic
On 23 March 2010 00:10, Johan Tibell johan.tib...@gmail.com wrote: A sequence of bytes is not the same thing as a sequence of Unicode code points. If you want to replace String by something more efficient have a look at Data.Text. Though Data.Text still has the disadvantage of not being as

[Haskell-cafe] which version is in the platform

2010-03-22 Thread S. Doaitse Swierstra
On the page: http://hackage.haskell.org/platform/ I am told that the platform includes ghc-6.10.4, but if I click there on the Haskell:batteries included link to get to the page: http://hackage.haskell.org/platform/contents.html its states there that I get 6.12.1? Doaitse

Re: [Haskell-cafe] which version is in the platform

2010-03-22 Thread Don Stewart
doaitse: On the page: http://hackage.haskell.org/platform/ I am told that the platform includes ghc-6.10.4, but if I click there on the Haskell:batteries included link to get to the page: http://hackage.haskell.org/platform/contents.html its states there that I get 6.12.1? The

Re: [Haskell-cafe] which version is in the platform

2010-03-22 Thread S. Doaitse Swierstra
It seems that I am being served old pages by my web browser from the cache on my machine. By reloading the platform page, I suddenly am asked what system I do have, from weher I am referred to the 6.12 version of the platform, Doaitse On 22 mrt 2010, at 14:25, Don Stewart wrote: doaitse:

Re: [Haskell-cafe] which version is in the platform

2010-03-22 Thread Don Stewart
doaitse: It seems that I am being served old pages by my web browser from the cache on my machine. By reloading the platform page, I suddenly am asked what system I do have, from weher I am referred to the 6.12 version of the platform, Great! ___

[Haskell-cafe] ANN: Three package announcements

2010-03-22 Thread Mario Blažević
There are three new packages on Hackage: - monad-parallel 0.5 (http://hackage.haskell.org/package/monad-parallel) - monad-coroutine 0.5 (http://hackage.haskell.org/package/monad-coroutine) - Streaming Component Combinators 0.5 (http://hackage.haskell.org/package/scc) The

[Haskell-cafe] CUFP mailing list

2010-03-22 Thread Günther Schmidt
Hi everyone, is there a mailing list for CUFP-lers? I have some questions that are related to commercial software development (in Haskell) which I don't think fit well on this list. Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread David Leimbach
On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.comwrote: On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com wrote: My question or discussion point: Why not depreciate [Char] altogether and favour of lazy Bytestrings? A sequence of bytes is not the

[Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-22 Thread Stephen Tetley
Hello All Modern functional programming languages give you algebraic data types that are mighty convenient for programming with syntax trees. However, I'm working in a domain (music typesetting) where modelling syntax with trees can be problematic and I'm wondering whether I should work at a

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Jochem Berndsen
David Leimbach wrote: On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.com mailto:johan.tib...@gmail.com wrote: On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com mailto:johann.hoec...@gmail.com wrote: My question or discussion point: Why

Re: [Haskell-cafe] haskell platform questions

2010-03-22 Thread Gregory Collins
wren ng thornton w...@freegeek.org writes: I'm still on 10.5.8. I don't have cabal-install installed yet, but I just installed GHC-6.12.1/HP-2010.1.0.0. I can verify that ghci works fine so far. I'll check out cabal-install in the next couple days. If there is an issue here it'd be with the

Re: [Haskell-cafe] Re: breadth first search one-liner?

2010-03-22 Thread Bertram Felgenhauer
Bertram Felgenhauer wrote: or bfs next start = lefts . takeWhile (not . null) I copied the wrong version. This should be bfs next start = rights . concat . takeWhile (not . null) -- rest unchanged . unfoldr (Just . span (either (const False) (const True)) . tail)

[Haskell-cafe] Announce: Haskell Platform 2010.1.0.0 (beta) release

2010-03-22 Thread Don Stewart
Live from (post-) Zurihac, I'm pleased to announce the 2010.1.0.0 (beta branch) release of the Haskell Platform, supporting GHC 6.12. http://hackage.haskell.org/platform/ The Haskell Platform is a comprehensive, robust development environment for programming in Haskell. For new users the

Re: [Haskell-cafe] RFC: only-read-or-write-vars

2010-03-22 Thread vlado
I wonder if this would be a place to add a function returning the pair of the read and write capabilities (for the lack of a better word) of a value. something like: rwPair:: v α - (ReadOnly v α , WriteOnly v α) rwPair a = (readOnly a, writeOnly a) sorry for the lame name,

Re: [Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-22 Thread Malcolm Wallace
I'm working in a domain (music typesetting) where modelling syntax with trees can be problematic and I'm wondering whether I should work at a lower level - essentially a list / stream of lexemes and some notion of a context stack for processing, tracking when I'm inside a tuplet and the

Re: [Haskell-cafe] Syntax programming with lexemes rather than trees?

2010-03-22 Thread Stephen Tetley
Hi Malcolm Thanks - particularly I don't want to go to an AST because its I'm finding it too convoluted 'shape wise' - processing beam groups inside tuplets etc. is a nightmare - music representations have had at least eight centuries of ad hoc extension. I know Norman Ramsey and colleagues

Re: [Haskell-cafe] Re: Strange typing?

2010-03-22 Thread Ozgur Akgun
Thank you all very much for the pointers. Best, On 22 March 2010 09:32, Gleb Alexeyev gleb.alex...@gmail.com wrote: Ozgur Akgun wrote: Is there any way to limit a functions type, not by a data type but by a group of constructors of a data type? If not, what would be the *right* thing to do

[Haskell-cafe] Hackape package lackage

2010-03-22 Thread Dougal Stanton
Hackage seems to be down again. $ cabal update Downloading package list from server 'http://hackage.haskell.org/packages/archive' ^Ccabal: interrupted $ ping -c3 hackage.haskell.org PING abbot.galois.com (69.30.63.204) 56(84) bytes of data. --- abbot.galois.com ping statistics --- 3 packets

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Lennart Augustsson
Turn on OverloadedStrings and you can pattern match on any type you like that is in the IsString class. Which means that Data.Text can use string literals just like regular strings (but you can't use Char literals in the match). On Mon, Mar 22, 2010 at 1:15 PM, Ivan Miljenovic

Re: [Haskell-cafe] Hackape package lackage

2010-03-22 Thread Don Stewart
We're watching *massive* traffic right now due to HP release. It's not down, just very very busy. For fun, here's a map of who's downloading Haskell: http://imgur.com/flwPF.png 74 countries in 12 hours, and counting. - Don dougal: Hackage seems to be down again. $ cabal update

Re: [Haskell-cafe] Hackape package lackage

2010-03-22 Thread Thomas Davie
I'd love to see that map normalised by the population of the country – would be interesting to see where Haskell is popular. Bob On 22 Mar 2010, at 16:22, Don Stewart wrote: We're watching *massive* traffic right now due to HP release. It's not down, just very very busy. For fun, here's a

[Haskell-cafe] ANN: data-category, restricted categories

2010-03-22 Thread Sjoerd Visscher
Hi everybody, At ZuriHac I released data-category. It is an implementation of several category-theoretical constructions. I started this library to learn about both category theory and type level programming, so I wanted to implement the CT concepts as directly as possible. This in contrast

[Haskell-cafe] Zarathustra

2010-03-22 Thread Günther Schmidt
Hi Cliff, here is a link which might interest you http://en.wikipedia.org/wiki/Zoroastrianism Love Günther ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: ANN: data-category, restricted categories

2010-03-22 Thread Maciej Piechotka
Hmm. What are benefits of data-category over category-extras? Regards signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: ANN: data-category, restricted categories

2010-03-22 Thread Sjoerd Visscher
Mainly that category-extras doesn't have restricted categories, so most of the categories in data-category cannot be defined with category-extras. This also means that in category-extras many constructions are built from the ground up, instead of being built with a few basic building blocks,

Re: [Haskell-cafe] haskell platform questions

2010-03-22 Thread Warren Harris
BTW, I started to try the macports method (thinking that maybe building on my machine would resolve the linker problem), but the package up there seems to be the old one: $ port info haskell-platform haskell-platform @2009.2.0.2 (devel, haskell) Description: This is the the Haskell

Re: [Haskell-cafe] haskell platform questions

2010-03-22 Thread Gregory Collins
Warren Harris warrensomeb...@gmail.com writes: Then I uninstalled everything, installed GHC-6.12.1- i386.pkg, then Haskell Platform 2010.1.0.0, and rebooted... and then experienced the cabal problem. BTW, there's some description of linker flags here:

Re: [Haskell-cafe] which version is in the platform

2010-03-22 Thread Ivan Lazar Miljenovic
Don Stewart d...@galois.com writes: The beta of the 2010.2.0.0 release is now up, which is based on GHC 6.12. Hang on, you just announced 2010.1.0.0... have you suddenly released _another_ major version? :p -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com IvanMiljenovic.wordpress.com

Re: [Haskell-cafe] CUFP mailing list

2010-03-22 Thread Erik de Castro Lopo
Günther Schmidt wrote: I have some questions that are related to commercial software development (in Haskell) which I don't think fit well on this list. Really? This is haskell-cafe. If its even tangentially haskell related I'm sure this this list would be fine. According to

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Mads Lindstrøm
Hi David Leimbach wrote: On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.com wrote: On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com wrote: My question or discussion point: Why not depreciate [Char] altogether

[Haskell-cafe] Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread Günther Schmidt
Hello Erik, all right then. I've written a commercial Desktop application in Haskell for the Win32 platform. The one thing missing is Software Copy Protection, ie. a software licensing mechanism. When I google for Software Copy Protection I get a lot of results, commercial products

Re: [Haskell-cafe] Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread Erik de Castro Lopo
Günther Schmidt wrote: I've written a commercial Desktop application in Haskell for the Win32 platform. The one thing missing is Software Copy Protection, ie. a software licensing mechanism. When I google for Software Copy Protection I get a lot of results, commercial products

Re: [Haskell-cafe] Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread MightyByte
Fundamentally, Software Copy Protection (as well as DRM) is an unsolvable problem. It's basically like saying that you want to give someone something and not give it to them at the same time. With physical products there are physical properties that you can use to accomplish some aspects of

Re: [Haskell-cafe] Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread Stephen Tetley
Hi Günther Congratulations! You might find this article useful. Though it only mentions one particular system Armadillo, there are a number of good tips like releasing updates frequently so the binaries change, and the author is well regarded in micro software circles.

[Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Dupont Corentin
Hello, I’m relatively new to Haskell. I’m wondering if it exist a tool to graphically represent Haskell code. Look at the little graphics at: http://www.haskell.org/arrows/index.html (and following pages) from Ross Paterson. http://www.haskell.org/arrows/index.htm If found these very useful

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Ivan Miljenovic
On 23 March 2010 10:02, Dupont Corentin corentin.dup...@gmail.com wrote: I’m relatively new to Haskell. Welcome! I’m wondering if it exist a tool to graphically represent Haskell code. Look at the little graphics at: http://www.haskell.org/arrows/index.html (and following pages) from Ross

[Haskell-cafe] Re: Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread Günther Schmidt
Hello Erik, the software I wrote and am about to sell was developed for use by German Hospitals only. It's being used to calculate a departments share of the revenues paid by the insurance companies for a case and needed every 6 months by the hospitals when it enters budget negotiations with

Re: [Haskell-cafe] Re: Software Deployment and Distribution - WAS Re: CUFP mailing list

2010-03-22 Thread Erik de Castro Lopo
Günther Schmidt wrote: Hello Erik, the software I wrote and am about to sell was developed for use by German Hospitals only. It's being used to calculate a departments share of the revenues paid by the insurance companies for a case and needed every 6 months by the hospitals when it

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Lyndon Maydwell
Reminds me of To Dissect a Mockingbird [http://dkeenan.com/Lambda/]. On Tue, Mar 23, 2010 at 7:12 AM, Ivan Miljenovic ivan.miljeno...@gmail.com wrote: On 23 March 2010 10:02, Dupont Corentin corentin.dup...@gmail.com wrote: I’m relatively new to Haskell. Welcome! I’m wondering if it exist a

Re: [Haskell-cafe] haskell platform questions

2010-03-22 Thread wren ng thornton
Gregory Collins wrote: wren ng thornton w...@freegeek.org writes: I'm still on 10.5.8. I don't have cabal-install installed yet, but I just installed GHC-6.12.1/HP-2010.1.0.0. I can verify that ghci works fine so far. I'll check out cabal-install in the next couple days. If there is an issue

Re: [Haskell-cafe] haskell platform questions

2010-03-22 Thread Ivan Miljenovic
On 23 March 2010 14:25, wren ng thornton w...@freegeek.org wrote: w...@semiramis:~ $ ls /usr/local ls: /usr/local: No such file or directory w...@semiramis:~ $ ls /usr/bin/cabal ls: /usr/bin/cabal: No such file or directory But http://hackage.haskell.org/platform/new/contents.html tells me

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Mihai Maruseac
I've proposed to do it at this GSOC. More exactly, it is still in the feedback phase, I'll integrate all feedback in another blog post and in an application for GSOC tomorrow. If you want to read about it in this stage, you can visit my blog [0]. Feedback on reddit can be seen here[1]. The

Re: [Haskell-cafe] Graphical representation of Haskell code

2010-03-22 Thread Ronald Guida
On Mon, Mar 22, 2010 at 7:02 PM, Dupont Corentin corentin.dup...@gmail.com wrote: Hello, I’m relatively new to Haskell. I’m wondering if it exist a tool to graphically represent Haskell code. ... Let’s try to do it on a simple example, as an exercise: f = Map (+1) Your graphic for f = map

Re: [Haskell-cafe] which version is in the platform

2010-03-22 Thread Don Stewart
ivan.miljenovic: Don Stewart d...@galois.com writes: The beta of the 2010.2.0.0 release is now up, which is based on GHC 6.12. Hang on, you just announced 2010.1.0.0... have you suddenly released _another_ major version? :p 2010.1.0.0 is definited as a 'beta' for 2010.2