[Haskell-cafe] Richard Bird and the fast nub function

2013-09-29 Thread Henning Thielemann
In Richard Bird's Functional Pearls in Algorithm Design there is chapter 10 Removing duplicates which is about a fast and sorting variant of 'nub'. After reading the introduction of the chapter I answered mentally Set.toAscList . Set.fromList - next chapter please. However after the

Re: [Haskell-cafe] [Haskell] ANN: Cabal v1.18.0 released

2013-09-16 Thread Henning Thielemann
On Wed, 4 Sep 2013, Johan Tibell wrote: * GHCi support. It's now much easier to use ghci when developing your packages, especially if those packages require preprocessors (e.g. hsc2hs). That's a great feature! How can I configure Cabal to start ghci with certain options? I like to enable

Re: [Haskell-cafe] sequence causing stack overflow on pretty small lists

2013-08-28 Thread Henning Thielemann
On Tue, 27 Aug 2013, John Lato wrote: [1] Most people are physically incapable of reading documents that explain why what they want to do won't work.  Even if people did read the documentation, I suspect that the people most in need of the information would be the least likely to understand

Re: [Haskell-cafe] Extending Type Classes

2013-08-26 Thread Henning Thielemann
The problem of refinement of type classes annoys me from time to time when I work on the NumericPrelude. It is an experimental type class hierarchy for mathematical types. Sometimes a new data type T shall be implemented and it turns out that you can implement only a part of all methods of

[Haskell-cafe] GHC and backwards compatibility

2013-08-21 Thread Henning Thielemann
If you use $ cabal install --constraint=array installed then cabal-install is forced to use the installed version of array. If a package conflicts with this version, then it will report the conflicting packages. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Renumbered mailing list posts

2013-08-11 Thread Henning Thielemann
Am 10.08.2013 21:48, schrieb Austin Seipp: Henning, Thanks for the report. I'm currently investigating this, and think it should be possible to keep all of the old URLs intact. Thank you! This would be really really great! ___ Haskell-Cafe mailing

[Haskell-cafe] Renumbered mailing list posts

2013-08-10 Thread Henning Thielemann
Recently I found that links from Google search results to archive Haskell-Cafe messages are invalid. The messages are still there, but got a different number. E.g. the search result says: http://www.haskell.org/pipermail/haskell-cafe/2011-February/089455.html But the message is at

Re: [Haskell-cafe] [Haskell] ANN: Monad.Reader Issue 22

2013-08-08 Thread Henning Thielemann
On Wed, 7 Aug 2013, Edward Z. Yang wrote: I am pleased to announce that Issue 22 of the Monad Reader is now available. http://themonadreader.files.wordpress.com/2013/08/issue22.pdf Issue 22 consists of the following two articles: * Generalized Algebraic Data Types in Haskell by Anton

Re: [Haskell-cafe] [Haskell] [ANN] Initial release of the threepenny-gui library, version 0.1.0.0

2013-07-21 Thread Henning Thielemann
On Sun, 21 Jul 2013, Sergey Mironov wrote: Hi, I have a Path problem when installing threepenny-gui from Hackage. Probably somtething trivial. I have written a small script cabal-upload that tries to compile a package before uploading it to Hackage. That helps to assert that all required

[Haskell-cafe] meaning of referential transparency

2013-04-06 Thread Henning Thielemann
Can someone enlighten me about the origin of the term referential transparency? I can lookup the definition of referential transparency in the functional programming sense in the Haskell Wiki and I can lookup the meaning of reference and transparency in a dictionary, but I don't know why

[Haskell-cafe] closed world instances, closed type families

2013-04-02 Thread Henning Thielemann
Recently I needed to define a class with a restricted set of instances. After some failed attempts I looked into the DataKinds extension and in Giving Haskell a Promotion I found the example of a new kind Nat for type level peano numbers. However the interesting part of a complete case

Re: [Haskell-cafe] closed world instances, closed type families

2013-04-02 Thread Henning Thielemann
On Tue, 2 Apr 2013, Daniel Peebles wrote: It seems very similar to Ryan Ingram's post a few years back (pre-TypeNats):  http://www.haskell.org/pipermail/haskell-cafe/2009-June/062690.html The main difference is that he introduces the knowledge about zero vs. suc as a constraint, and you

Re: [Haskell-cafe] [Haskell] ANN: psqueue-benchmarks - benchmarks of priority queue implementations

2013-03-29 Thread Henning Thielemann
On Fri, 29 Mar 2013, Niklas Hambüchen wrote: (This is a slightly detailed email. If you are the maintainer of one of the packages benchmarked here, you might want to read it though.) Could you please put your experiences the Wiki? This would help others to choose a package.

Re: [Haskell-cafe] [Haskell] ANN: psqueue-benchmarks - benchmarks of priority queue implementations

2013-03-29 Thread Henning Thielemann
On Fri, 29 Mar 2013, Louis Wasserman wrote: Bearing in mind that I haven't looked at this in several years...  Why did you switch from queuelike to pqueue? Because I liked the API better?  Could you put the code up somewhere manageable (repo)? I had it up on darcs, but since that's not

Re: [Haskell-cafe] [Haskell] ANN: psqueue-benchmarks - benchmarks of priority queue implementations

2013-03-29 Thread Henning Thielemann
On Fri, 29 Mar 2013, Niklas Hambüchen wrote: On 29/03/13 20:14, Henning Thielemann wrote: Was it on code.haskell.org? Then it might have been moved to a non-web directory after the last attack 2011. Does that mean the repo is still there without web access I assume that. or gone

Re: [Haskell-cafe] [Haskell] ANN: monad-bool 0.1

2013-01-22 Thread Henning Thielemann
On Tue, 22 Jan 2013, John Wiegley wrote: Use 'onlyIf' with AndM and AndMT to guard later statements, which are only evaluated if every preceding 'onlyIf' evaluates to True. For example: foo :: AndM Int foo = do onlyIf (True == True) return 100 onlyIf (True ==

Re: [Haskell-cafe] [Haskell] Silent error

2013-01-20 Thread Henning Thielemann
On Mon, 21 Jan 2013, mip...@meta.ua wrote: The program looks like this: --*** factorial :: Int-Int factorial n = product [1..n] main = do print $ factorial 50 --*** And that yields 0 (no errors). Is it a bug or feature? :) This question is

Re: [Haskell-cafe] [Haskell] Importing Repa library

2013-01-03 Thread Henning Thielemann
On Thu, 3 Jan 2013, Емануела Моллова wrote: Hello! :) I think you should better post your question to haskell-cafe@haskell.org. Then I put this script  import qualified Data.Array.Repa as R :m +Data.Array.Repa Z into the file file.hs, This is GHCi syntax, but it is not a valid Haskell

Re: [Haskell-cafe] mtl-2.1 severly broken, cabal needs blacklisting

2012-11-14 Thread Henning Thielemann
On Wed, 14 Nov 2012, Jean-Philippe Bernardy wrote: On Tue, Nov 13, 2012 at 11:39 PM, Andreas Abel andreas.a...@ifi.lmu.de wrote: On 13.11.12 11:13 PM, Jean-Philippe Bernardy wrote: Blacklisting equals releasing a bugfix. Not quite. I propose to *define* blacklisting as

Re: [Haskell-cafe] mtl-2.1 severly broken, cabal needs blacklisting

2012-11-13 Thread Henning Thielemann
On Tue, 13 Nov 2012, Bas van Dijk wrote: On 13 November 2012 17:27, Andreas Abel andreas.a...@ifi.lmu.de wrote: This calls for a means of blacklisting broken or malicious packages. cabal update should also pull a blacklist of packages that will never be selected by cabal install (except

Re: [Haskell-cafe] ANN: data-dword: Long binary words from short ones

2012-10-11 Thread Henning Thielemann
On Thu, 11 Oct 2012, Mikhail Vorozhtsov wrote: I'm pleased to announce my new little library, data-dword[1]. It provides Template Haskell utilities for defining binary word data types from low and high halves, e.g. data Word96 = Word96 Word32 Word64 -- strictness is configurable data Int96

Re: [Haskell-cafe] total Data.Map.! function

2012-10-09 Thread Henning Thielemann
Hi Joachim, On Wed, 5 Oct 2012, Joachim Breitner wrote: On Wed, 3 Oct 2012, Henning Thielemann wrote: I wondered whether there is a brilliant typing technique that makes Data.Map.! a total function. That is, is it possible to give (!) a type, such that m!k expects a proof that the key k

[Haskell-cafe] total Data.Map.! function

2012-10-03 Thread Henning Thielemann
I wondered whether there is a brilliant typing technique that makes Data.Map.! a total function. That is, is it possible to give (!) a type, such that m!k expects a proof that the key k is actually present in the dictionary m? How can I provide the proof that k is in m? Same question for

Re: [Haskell-cafe] [Haskell] A riddle...

2012-07-17 Thread Henning Thielemann
On Mon, 16 Jul 2012, Felipe Almeida Lessa wrote: On Mon, Jul 16, 2012 at 12:33 PM, Vo Minh Thu not...@gmail.com wrote: It seems like the infered type (and thus bounds) is different when you force the result to be a Color or not. Just give explicit type signatures and conversion functions.

Re: [Haskell-cafe] Sifflet type checker

2012-07-09 Thread Henning Thielemann
On Mon, 9 Jul 2012, gdwe...@iue.edu wrote: data Type = TypeVar TypeVarName -- named type variable | TypeCons TypeConsName [Type] -- constructed type deriving (Eq) Do you still think my type checker would be useful to you, or to Haskellers generally? I see. Then

Re: [Haskell-cafe] [Haskell] ANNOUNCE: Sifflet visual programming language, release 2.0.0.0

2012-07-07 Thread Henning Thielemann
On Thu, 5 Jul 2012, gdwe...@iue.edu wrote: Sifflet and sifflet-lib 2.0.0.0, now available on Hackage! This version introduces a type checker and partial support for higher order functions in Sifflet, the visual, functional programming language and support system for students learning about

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Henning Thielemann
On Sat, 7 Jul 2012, rocon...@theorem.ca wrote: On Fri, 6 Jul 2012, Dan Burton wrote: Following the announcement of lens-family, I'm pleased to announce lens-family-th 0.1.0.0, a Template Haskell library supplying macros to generate lens-family lenses for fields of data types declared with

Re: [Haskell-cafe] [Haskell] ANNOUNCE: lens-family-th 0.1.0.0

2012-07-07 Thread Henning Thielemann
On Sat, 7 Jul 2012, Dan Burton wrote: Could the documentation be an argument of mkLenses? Does haddock run on the template-haskell expanded code?   TH macros must have type Q [Dec]. Dec has no constructor for comments, with the exception of pragmas. This might be feature request worthy,

Re: [Haskell-cafe] [Haskell] [ANN] GenCheck - a generalized property-based testing framework

2012-06-20 Thread Henning Thielemann
On Tue, 19 Jun 2012, Jacques Carette wrote: Its main novel features are: * introduces a number of /testing strategies/ and /strategy combinators/ * introduces a variety of test execution methods * guarantees uniform sampling (at each rank) for the random strategy * guarantees both uniqueness

[Haskell-cafe] relocation R_X86_64_PC32 against undefined symbol

2012-06-20 Thread Henning Thielemann
Just for the record: I compiled with GHC and got the linker error: /usr/bin/ld: dist/build/.../Module.dyn_o: relocation R_X86_64_PC32 against undefined symbol `..._xyz1_closure' can not be used when making a shared object; recompile with -fPIC Problem was that I forgot to declare Module

Re: [Haskell-cafe] converting functional dependencies to type families

2012-06-11 Thread Henning Thielemann
On Mon, 11 Jun 2012, Simon Peyton-Jones wrote: Thanks. I've linked to it from http://www.haskell.org/haskellwiki/GHC/Type_families#Frequently_asked_questions Thank you! I already added this and another link to a new See also section below. Which one shall we maintain?

Re: [Haskell-cafe] converting functional dependencies to type families

2012-06-10 Thread Henning Thielemann
On Thu, 7 Jun 2012, Simon Peyton-Jones wrote: Very useful! Maybe worth turning into a page on the Haskell wiki? I created one: http://www.haskell.org/haskellwiki/Functional_dependencies_vs._type_families ___ Haskell-Cafe mailing list

[Haskell-cafe] HaL7: Haskell-Treffen in Halle/Saale, Freitag 2012-07-13

2012-06-06 Thread Henning Thielemann
finden Sie hier: http://iba-cg.de/hal7.html und die Anmeldung da: http://sim.mathematik.uni-halle.de:8080/hal7/ Bitte melden Sie sich bis zum 4. Juli an. Wir freuen uns auf Ihr zahlreiches Erscheinen! für das Programmkomitee Henning Thielemann

[Haskell-cafe] converting functional dependencies to type families

2012-06-05 Thread Henning Thielemann
Hi all, when I reported a typechecker performance problem related to functional dependencies http://hackage.haskell.org/trac/ghc/ticket/5970 I promised to try to convert from functional dependencies to type families. Thus I converted my code and the llvm package to type-families:

[Haskell-cafe] HaL-7, 2012-07-13, Call for submissions

2012-04-23 Thread Henning Thielemann
Software. Schicken Sie Beitragsvorschläge als PDF-Dokument bis zum 21.05.2012 per Mail an hal-committee at iba-cg punkt de oder an ein Mitglied des Programmkomitees. Programmkomitee * Henning Thielemann - Univ. Halle (Vorsitzender), * Petra Hofstedt - BTU Cottbus, * Alf Richter - iba CG

Re: [Haskell-cafe] [Haskell] ANNOUNCE: notcpp-0.0.1

2012-04-13 Thread Henning Thielemann
On Fri, 13 Apr 2012, Ben Millwood wrote: But I never liked using CPP: it completely defeats haskell-src-exts and hence things like SourceGraph, and anyway it's not designed for Haskell and doesn't at all understand its structure, or fit with its syntax. With a little thought, I wondered if

Re: [Haskell-cafe] [Haskell] Higher types in contexts

2012-03-05 Thread Henning Thielemann
moved to haskell-cafe On Mon, 5 Mar 2012, Barney Hilken wrote: Is there any deep reason why I can't write a polymorphic type in a context? I think the record update problem can be (sort of) solved if you could write: class Has r Rev (forall a. [a] - [a]) = HRClass r where

Re: [Haskell-cafe] [Haskell] Support tools for development with Cabal and Darcs

2012-02-10 Thread Henning Thielemann
On Fri, 10 Feb 2012, Duncan Coutts wrote: Would you mind giving me a breif explanation of the compiling multiple local packages in the right order feature? I'd like to understand what is missing in cabal-install in this respect. Currently with cabal-install you can say: cabal install ./a ./b

Re: [Haskell-cafe] [Haskell] Support tools for development with Cabal and Darcs

2012-02-10 Thread Henning Thielemann
On Fri, 10 Feb 2012, Duncan Coutts wrote: I wonder if you have any suggestions for UI changes/improvements for cabal-install for working with related sets of local packages (something it's fairly weak on at the moment). Are there things in cabal-sort you think we should just lift directly into

Re: [Haskell-cafe] [Haskell] Support tools for development with Cabal and Darcs

2012-02-10 Thread Henning Thielemann
On Fri, 10 Feb 2012, Henning Thielemann wrote: On Fri, 10 Feb 2012, Duncan Coutts wrote: I wonder if you have any suggestions for UI changes/improvements for cabal-install for working with related sets of local packages (something it's fairly weak on at the moment). Are there things in cabal

Re: [Haskell-cafe] [Haskell] ANNOUNCE multiarg - parser combinators for command line parsing

2012-01-30 Thread Henning Thielemann
On Sun, 29 Jan 2012, Simon Meier wrote: I'm currently using Neil Mitchell's cmdargs package [1]. How does your package compare to that? Last time I checked cmdargs it was not referential transparent. Is multiarg better in this respect? ___

[Haskell-cafe] black Wikipedia (Was: PhD program at Portland State accepting applications)

2012-01-18 Thread Henning Thielemann
On Wed, 18 Jan 2012, Nathan Collins wrote: - Portland is a very popular US city, known for beer, bikes, music, and street food: http://en.wikipedia.org/wiki/Portland_Oregon (wikipedia is blacked out today) Maybe it is only a JavaScript trick. In Firefox (with JavaScript) I see the complete

Re: [Haskell-cafe] black Wikipedia

2012-01-18 Thread Henning Thielemann
On Wed, 18 Jan 2012, Andrew Butterfield wrote: Just add ?banner=none to the url if you really have to read the page Maybe the intention was to demonstrate that censorship (in this case self-censorship) is mostly a problem for average users but not for advanced users.

[Haskell-cafe] compare lengths of lists lazily

2011-12-19 Thread Henning Thielemann
Shortest and most obfuscating solution I found is: import Data.Ord (comparing) import Control.Applicative (($)) compareLength :: [a] - [a] - Ordering compareLength = comparing (()$) :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [Haskell] Dutch National FP Day 2012

2011-11-16 Thread Henning Thielemann
On Wed, 16 Nov 2011, Sean Leather wrote: (Sent on behalf of Doaitse Swierstra) Despite some last minute changes to the planning we are happy to announce that the next Dutch functional programming day will take place on January 6, 2012, at the university campus De Uithof of Utrecht

Re: [Haskell-cafe] [Haskell] ANN: global-variables-1.0

2011-10-12 Thread Henning Thielemann
On Wed, 12 Oct 2011, Jean-Marie Gaillourdet wrote: * Simplify the configuration problem - at least for code in the IO monad. Note, that this library does not encourage sloppy software design by re-introducing all bad effects of global variables. But isn't this kind of solution for the

Re: [Haskell-cafe] fyi GHC 7.2.1 release on the benchmarks game

2011-08-12 Thread Henning Thielemann
On 12.08.2011 18:44, austin seipp wrote: Hello Isaac, On Fri, Aug 12, 2011 at 10:18 AM, Isaac Gouyigo...@yahoo.com wrote: 1) Some of the GHC programs contributed to the benchmarks game have problems with recent GHC releases - meteor-contest #5 - Ambiguous occurrence `permutations'

Re: [Haskell-cafe] ANNOUNCE: yap-0.0 - yet another prelude

2011-08-11 Thread Henning Thielemann
On Thu, 11 Aug 2011, Sebastian Fischer wrote: [switched to Cafe] On Wed, Aug 10, 2011 at 11:46 PM, Henning Thielemann lemm...@henning-thielemann.de wrote: On Wed, 10 Aug 2011, Paterson, Ross wrote: Yet another restructuring of the Prelude numeric classes on algebraic lines, proposed

Re: [Haskell-cafe] How to use cabal macros in .hsc files

2011-08-11 Thread Henning Thielemann
On 08.08.2011 12:08, Bas van Dijk wrote: Hello, Currently it's not possible to use cabal macros like MIN_VERSION_base(x,y,z) in .hsc files: http://hackage.haskell.org/trac/hackage/ticket/870 Is there a workaround to get the same effect? Writing a plain Haskell module that contains the code

Re: [Haskell-cafe] Help understanding Haskell runtime costs

2011-08-11 Thread Henning Thielemann
On 09.08.2011 01:43, Thiago Negri wrote: Hello all, I'm relatively new to Haskell and trying to solve some online judge's problems in it. One of the problems is to say if a given sentence is a tautogram or not. A tautogram is just a sentence with all the words starting with the same letter. My

Re: [Haskell-cafe] [Haskell] ANNOUNCE: GHC version 7.2.1

2011-08-11 Thread Henning Thielemann
On 09.08.2011 22:01, Ian Lynagh wrote: The GHC Team is pleased to announce a new major release of GHC, 7.2.1. The 7.2 branch is intended to be more of a technology preview than normal GHC stable branches; in particular, it supports a significantly improved version of DPH, as well as new

Re: [Haskell-cafe] Github support for cabal files

2011-08-08 Thread Henning Thielemann
On 24.07.2011 13:11, Joris Putcuyps wrote: On Sat, 23 Jul 2011 19:25:53 -0700 Greg Weberg...@gregweber.info wrote: [1] http://hackage.haskell.org/package/hamlet The cabal file should be compact, and quite often the description field is very lengthy. I would like it alot if I could

Re: [Haskell-cafe] For class Monoid; better names than mempty mappend might have been: mid (mident) mbinop

2011-08-08 Thread Henning Thielemann
On 24.07.2011 22:20, Antoine Latter wrote: On Sat, Jul 23, 2011 at 1:41 PM, KCkc1...@gmail.com wrote: It would be easier for beginners to grok. I think that assumes that all beginners have a strong foundation in algebra. Although it does have the advantage that the names are as abstract as

Re: [Haskell-cafe] difference between class context and deriving

2011-08-02 Thread Henning Thielemann
On Tue, 2 Aug 2011, Patrick Browne wrote: What is the difference between using a class context and deriving in data type declaration? Are there certain situations in which one or the other is preferred? data Eq a = Set1 a = NilSet1 | ConsSet1 a (Set1 a) Note that these contexts might get

Re: [Haskell-cafe] A language that runs on the JVM or .NET has the advantage of Oracle Microsoft making those layers more parallelizable.

2011-07-30 Thread Henning Thielemann
On Sat, 30 Jul 2011, KC wrote: Are there plans a foot (or under fingers) to make a version of Haskell that runs on the JVM? http://www.haskell.org/haskellwiki/GHC:FAQ#Why_isn.27t_GHC_available_for_.NET_or_on_the_JVM.3F ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Properties for Foldable

2011-07-29 Thread Henning Thielemann
On Fri, 29 Jul 2011, Conal Elliott wrote: Is there a collection of laws associated with the Foldable class? Or for Traversable?  - Conal Recently I asked the same question: http://www.haskell.org/pipermail/libraries/2011-June/016429.html and got the answer:

Re: [Haskell-cafe] Binding of an integer variable

2011-07-28 Thread Henning Thielemann
On Thu, 28 Jul 2011, Paul Reiners wrote: I have a question about the following GHCi interaction: Prelude let x = 23 Prelude :show bindings x :: Integer = _ What is the meaning of the underscore in the third line?  Why doesn't it say this, instead? x :: Integer = 23 I have never used

Re: [Haskell-cafe] Binding of an integer variable

2011-07-28 Thread Henning Thielemann
On Thu, 28 Jul 2011, Brandon Allbery wrote: On Thu, Jul 28, 2011 at 14:52, Henning Thielemann lemm...@henning-thielemann.de wrote: I have never used ':show bindings' before ... in other cases like   let x='a' and   let x=23::Int Since you gave explicit types, x is bound to strict values

Re: [Haskell-cafe] Approximate String Matching

2011-07-27 Thread Henning Thielemann
On Wed, 27 Jul 2011, dokondr wrote: Hi, I am looking for Haskell libraries to do approximate string matching: http://en.wikipedia.org/wiki/Approximate_string_matching I need this to reduce a set of English word variants with spelling errors to a single canonical dictionary entry. Any

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Henning Thielemann
On Mon, 25 Jul 2011, Manfred Lotz wrote: Hi there, If I take example imap.hs import System.IO import Network.HaskellNet.IMAP import Text.Mime import qualified Data.ByteString.Char8 as BS import Control.Monad -- the next lines were changed to fit to my local imap server imapServer =

Re: [Haskell-cafe] Idiomatic ways to make all instances of a certain class also instances of another?

2011-07-26 Thread Henning Thielemann
On Tue, 26 Jul 2011, Tim Cowlishaw wrote: For instance, for a typeclass representing the interface that any Order type should implement: class Order o where price :: o - Int size :: o - Int I'd like to be able to specify an Eq instance for all types of class Order in a manner similar to

Re: [Haskell-cafe] Library for Sparse Vectors?

2011-07-26 Thread Henning Thielemann
On Tue, 26 Jul 2011, Alexander Solla wrote: Given two (IntMap Double)s a and b, I would compute the projection of a along b as cosineSimilarity :: IntMap Double - IntMap Double - Double cosineSimilarity a b  = (dot a b) / ((norm a) * (norm b)) where                  dot  = sum . elems .

Re: [Haskell-cafe] Library for Sparse Vectors?

2011-07-26 Thread Henning Thielemann
On Wed, 27 Jul 2011, dokondr wrote: In your example: 1)  I would use: dot = dot' * dot' dot' = sum . elems . intersectionWith (*) norm = sum . fmap (**2) . elems  instead of: dot = sum . elems . intersectionWith (*) norm = (**0.5) . sum . fmap (**2) .

Re: [Haskell-cafe] Stack space overflow in HaskellNet

2011-07-26 Thread Henning Thielemann
On Tue, 26 Jul 2011, Manfred Lotz wrote: main = do s con - connectIMAP imapServer login con user pass mboxes - list con mapM print mboxes This should be mapM_ and 'ghc -Wall' spots this problem since 6.12. The compiler (7.04) doesn't tell me anything about it. It seems that it is

Re: [Haskell-cafe] NetSNMP; FreeBSD 8.1

2011-07-20 Thread Henning Thielemann
On Wed, 20 Jul 2011, Комар Максим wrote: I want to install package NetSNMP: cabal install NetSNMP Resolving dependencies... Configuring NetSNMP-0.1.6... cabal: Missing dependency on a foreign library: * Missing C library: netsnmp This problem can usually be solved by installing the system

Re: [Haskell-cafe] haskell zlip read position

2011-07-20 Thread Henning Thielemann
On Wed, 20 Jul 2011, rahul wrote: Hi Guys, I am trying to parse a binary stream with the format for one entry [headers, zlib compressed content] , with multiple entries. I can use the Zlib library to get the content for the first entry after the headers, but I cannot find a way to get the

Re: [Haskell-cafe] NetSNMP; FreeBSD 8.1

2011-07-20 Thread Henning Thielemann
On Wed, 20 Jul 2011, Brandon Allbery wrote: Ports is build-from-source, so every package is what Linux calls a -dev package. The OP might need to make sure that cabal knows to look in /usr/local for libraries. I see. If net-snmp supports pkg-config then all such problems should be

Re: [Haskell-cafe] Parsing cabal files to calculate average number of dependencies

2011-07-19 Thread Henning Thielemann
On 02.07.2011 01:26, Gwern Branwen wrote: Another thing you can do along the same lines is generate a script to download all the repos from packages which declare repos. Some ugly code: If 'script' also includes Haskell code, then the 'tar' package could be of help to walk throught the TAR

[Haskell-cafe] Compiler support for orphan instances

2011-07-14 Thread Henning Thielemann
Yesterday I tried to install fix-imports and ran into another example of problems with changing transitive closures of orphan instance propagation: $ cabal install fix-imports Resolving dependencies... Configuring fix-imports-0.1.2... Preprocessing executables for fix-imports-0.1.2...

Re: [Haskell-cafe] ANN: fix-imports-0.1.2

2011-07-13 Thread Henning Thielemann
On 12.07.2011 09:59, Evan Laforge wrote: I meant more in the Before: ... After: ... sense ;-) (i.e. visually being able to tell what your program does, rather than just a description). Oh, ok, I guess I can do that too: Before: module M where import ZZ.Out.Of.Order import qualified

Re: [Haskell-cafe] Inconsistent trailing comma in export list and record syntax

2011-07-11 Thread Henning Thielemann
On Mon, 11 Jul 2011, Johan Tibell wrote: On Mon, Jul 11, 2011 at 3:54 PM, Henning Thielemann thunderb...@henning-thielemann.de wrote: Johan Tibell wrote: I've found this quite annoying, especially when using CPP to conditionally include something in a list, as it might force you to reorder

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-10 Thread Henning Thielemann
On Sun, 10 Jul 2011, Felipe Almeida Lessa wrote: On Sat, Jul 9, 2011 at 7:58 AM, Henning Thielemann lemm...@henning-thielemann.de wrote: My stream processors are not Arrows, because 'first' cannot be implemented. However, 'arr' and '.' can be implemented. ... Since I have no Arrow instance

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-10 Thread Henning Thielemann
On Sun, 10 Jul 2011, Heinrich Apfelmus wrote: Question: how would you actually like to describe the guitar simulator at a high-level? Did you already wish for some specific combinators? Assume that you had something like reactive-banana available and imagine that there were a benevolent

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-09 Thread Henning Thielemann
On Sat, 9 Jul 2011, Heinrich Apfelmus wrote: Oh, I am addressed explicitly, thanks! Yes, GUI for 'streamed' would be nice, too. In the meantime I switched from an approach with lazy lists to one with arrow-like stream processors. This way I could resolve all issues with wrong timing and

Re: [Haskell-cafe] Call for GUI examples - Functional Reactive Programming

2011-07-08 Thread Henning Thielemann
a great example. I hope that wxHaskell offers a platform-independent way to play sound. I think there are some ways for playing sounds in a portable way, like 'jack' or PortAudio. * Notes of a musical performance can be modeled as event streams (MIDI), as Henning Thielemann has [done with great

Re: [Haskell-cafe] function terms

2011-07-06 Thread Henning Thielemann
On Wed, 6 Jul 2011, Ian Childs wrote: Suppose I have two terms s and t of type a and b respectively, and I want to write a function that returns s applied to t if a is an arrow type of form b - c, and nothing otherwise. How do i convince the compiler to accept the functional application only

Re: [Haskell-cafe] function terms

2011-07-06 Thread Henning Thielemann
On Wed, 6 Jul 2011, Ian Childs wrote: Yes they are Haskell expressions - I called them terms because actually they are GADTs of type Term a and Term b. I can't use type 'b - c' as they are part of a larger pattern. I have a function that returns a witness to 's :: Term a' and 't :: Term b'

Re: [Haskell-cafe] function terms

2011-07-06 Thread Henning Thielemann
On Wed, 6 Jul 2011, Ian Childs wrote: Term a is meant to be the simply-typed lambda-calculus as a GADT. Then given two terms App (App = l1) r1, and App (App = l2) r2, I want to form App (App = (App l1 l2)) (App r1 r2), but as you can see this will only work if the types of l1 and l2, and r1

Re: [Haskell-cafe] ~ type operator

2011-07-02 Thread Henning Thielemann
On 24.06.2011 11:10, Daniel Fischer wrote: On Friday 24 June 2011, 10:26:42, Guy wrote: What does the ~ type operator mean? I've sometimes seen types such as (a ~ b) in error messages, but can't understand what GHC is trying to tell me. Type equality, (a ~ b) means that a and b are the same

Re: [Haskell-cafe] Period of a sequence

2011-07-02 Thread Henning Thielemann
On 26.06.2011 16:16, michael rice wrote: MathWorks has the function seqperiod(x) to return the period of sequence x. Is there an equivalent function in Haskell? seqperiod x = fst $ head $ filter (flip List.isPrefixOf x . snd) $ tail $ zip [0..] $ List.tails x This relies on the fact, that p

Re: [Haskell-cafe] Printing the empty list.

2011-07-02 Thread Henning Thielemann
On 01.07.2011 00:58, Joshua Ball wrote: GHCi seems to be clever about some things: If I try to print the empty list in ghci, I encounter no problems: Prelude [] [] Prelude show [] [] Prelude print [] [] Even though the type of the list is clearly unknown, it must be picking SOME type. (why

Re: [Haskell-cafe] commutative monoid?

2011-06-25 Thread Henning Thielemann
On Fri, 24 Jun 2011, Evan Laforge wrote: So there's a range of possible Monoid instances for each type, and maybe they were chosen by historical happenstance rather than some kind of principle monoid (is there such a thing?). Is there a name for the thing that's like a monoid, but the

Re: [Haskell-cafe] None brute-force BWT algorithm

2011-06-24 Thread Henning Thielemann
On Thu, 23 Jun 2011, larry.liuxinyu wrote: I think that version is still a brute-force solution. The only difference is that it uses EOF (sentinel) so that it can sort the suffixes instead of rotations. However, the big-O complexity is the same. Let's take the rbwt for example: rbwt xs =

Re: [Haskell-cafe] None brute-force BWT algorithm

2011-06-23 Thread Henning Thielemann
On Wed, 22 Jun 2011, larry.liuxinyu wrote: Hi, I read a previous thread about BWT implementation in Haskell: http://www.mail-archive.com/haskell-cafe@haskell.org/msg25609.html and http://sambangu.blogspot.com/2007/01/burrows-wheeler-transform-in-haskell They are all in a `brute-force' way,

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Thu, 16 Jun 2011, Daniel Patterson wrote: Do any of the ones on hackage work for you? http://hackage.haskell.org/package/csv-0.1.2 http://hackage.haskell.org/package/bytestring-csv http://hackage.haskell.org/package/csv-enumerator (note: hackage supports search via google it works

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: How to make cabal install all the dependencies? I couldn't find this in the docs at: http://www.haskell.org/haskellwiki/Cabal-Install Usually, 'cabal install' automatically installs all imported packages. But it will certainly not do, if a

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Fri, 17 Jun 2011, Dmitri O.Kondratiev wrote: cabal install spreadsheet --constraint=transformers==0.2.2.0 Resolving dependencies... cabal: cannot configure spreadsheet-0.1. It requires transformers ==0.0.* For the dependency on transformers ==0.0.* there are these packages:

Re: [Haskell-cafe] Simple CSV parser?

2011-06-16 Thread Henning Thielemann
On Thu, 16 Jun 2011, Felipe Almeida Lessa wrote: [1] http://hackage.haskell.org/package/bytestring-csv [2] http://hackage.haskell.org/package/csv-enumerator [3] http://hackage.haskell.org/package/spreadsheet [4] http://hackage.haskell.org/package/csv [5] http://hackage.haskell.org/package/ssv

Re: [Haskell-cafe] Best platform for development with GHC?

2011-06-14 Thread Henning Thielemann
On Wed, 15 Jun 2011, Dmitri O.Kondratiev wrote: Which platform - Mac OS X, Linux or Win32 is best for development with GHC today? How are things with Ubuntu? It was quite a while already that I used Haskell on Linux. Today I have to code on Win32  and Mac OS X. Installing extra libraries

Re: [Haskell-cafe] [Haskell] ANNOUNCE: Parallel and Concurrent programming in Haskell, a tutorial

2011-06-13 Thread Henning Thielemann
On Thu, 19 May 2011, Simon Marlow wrote: I've put together a tutorial on Parallel and Concurrent programming in Haskell, here: http://community.haskell.org/~simonmar/par-tutorial.pdf The main reason for writing this was that I needed some lecture notes for a course at the CEFP summer

Re: [Haskell-cafe] Errors installing 'Haskell Charts'

2011-06-10 Thread Henning Thielemann
On Fri, 10 Jun 2011, Dmitri O.Kondratiev wrote: /var/folders/Bo/BobN2Ap5GZW51e9o-n2Ack+++TI/-Tmp-/cairo-0.12.04207/cairo-0.12.0/Gtk2HsSetup.hs:201:69:     Couldn't match expected type `PackageDBStack'    against inferred type `PackageDB'     In the sixth argument of `registerPackage',

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Henning Thielemann
On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote: That's what I get (see below). What else should I do to install gnuplot? ~/wks/haskell-wks/gnuplot/gnuplot-0.4.2/srcghc -v Demo.hs Do you really want to compile the Demo (with ghc)? It is already compiled if 'cabal install -fbuildExamples'

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-10 Thread Henning Thielemann
On Sat, 11 Jun 2011, Dmitri O.Kondratiev wrote: Yes, you did, thanks. Yet, please allow me to ask a few more questions here, before I subscribe to gnuplot list. I am really short on time - must have some plots for demo next Monday ( 1) Can current version of gnuplot draw histograms? I need

Re: [Haskell-cafe] Input and output of mathematical expressions

2011-06-09 Thread Henning Thielemann
On Thu, 9 Jun 2011, Jacek Generowicz wrote: On 2011 Jun 9, at 16:59, Chris Smith wrote: Ae you looking to do this in a web application, or client-side? Since one of your requirements is to display a typeset equation, that makes a bit of difference. In a web-based setting, the best way to

Re: [Haskell-cafe] Replacing stdin from within Haskell

2011-06-09 Thread Henning Thielemann
On Thu, 9 Jun 2011, Neil Davies wrote: Anyone out there got an elegant solution to being able to fork a haskell thread and replace its 'stdin' ? Why do I want this - well I'm using the pcap library and I want to uncompress data to feed into 'openOffile' (which will take - to designate read

Re: [Haskell-cafe] Comment Syntax

2011-06-06 Thread Henning Thielemann
Nicolas Wu schrieb: This whole discussion is reminding me of Wadler's Law of Language Design [1], it's nice to see that in 15 years things haven't changed much! WADLER'S LAW OF LANGUAGE DESIGN In any language design, the total time spent discussing a feature in this list is

Re: [Haskell-cafe] Matplotlib analog for Haskell?

2011-06-03 Thread Henning Thielemann
Malcolm Wallace schrieb: I tried gnuplot: Demo.hs:25:18: Could not find module `Paths_gnuplot': Use -v to see a list of the files searched for. Failed, modules loaded: none. Prelude Graphics.Gnuplot.Simple Where to get `Paths_gnuplot': module? $ cd gnuplot-0.4.2 $ cabal

Re: [Haskell-cafe] Names for pretty-printing combinators

2011-06-02 Thread Henning Thielemann
Casey McCann schrieb: One drastic approach I've used in personal libraries--operator-heavy EDSLs specifically--is to define everything first with alphanumeric names, then put operators in their own modules. In some cases I'd have three such modules: One providing a minimal set of operators

Re: [Haskell-cafe] *GROUP HUG*

2011-06-01 Thread Henning Thielemann
Adrien Haxaire schrieb: I fully agree. These are two of the three reasons which made me choose haskell as the functional language to learn. Coding fortran all day, I wanted a new approach on programming. The strong scientific roots of haskell would give me stuff to learn and discover for a

Re: [Haskell-cafe] Decimal type-level arithmetic.

2011-05-31 Thread Henning Thielemann
On Wed, 1 Jun 2011, Serguey Zefirov wrote: I would like to present my version of type arithmetic with decimal encoding: http://thesz.mskhug.ru/svn/hhdl/TyleA.hs How does it compare to http://hackage.haskell.org/package/type-level ? ___

  1   2   3   4   5   6   7   8   9   10   >