Re: [Haskell-cafe] ANN: set-cover solves Sudoku, Soma cube, 8 Queens etc.

2013-09-08 Thread Johannes Waldmann
Henning Thielemann henning-thielemann.de> writes: > .. package set-cover for solving exact set cover problems. > http://hackage.haskell.org/package/set-cover It's hard to evaluate whether one could use the library because there's essentially no visible documentation. E.g., what does Math.SetCov

[Haskell-cafe] Unary functions and infix notation

2013-09-06 Thread Johannes Emerich
The operator `z' takes two arguments, but its type `a0 -> Bool' has only one In the expression: (`z` True) What is the purpose/reason for this behaviour? Thank you, --Johannes ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] xmonad (+ mate) evince problem?

2013-08-26 Thread Johannes Waldmann
Problem solved: with "mate", use "atril" instead of "evince". (I think it is a gtk2/tgk3 issue and it's got nothing to do with xmonad.) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Hoogle vs Hayoo

2013-08-23 Thread Johannes Waldmann
Mateusz Kowalczyk fuuzetsu.co.uk> writes: > I always thought [hayoo] was just Hoogle with more indexed docs. Wait - there's a semantic difference: hoogle does understand type signatures (e.g., it can specialize them, or flip arguments of functions) while hayoo just treats signatures as strings

[Haskell-cafe] haskore -> lilypond -> typesetting?

2013-08-21 Thread Johannes Waldmann
I tried using lilypond ( http://www.lilypond.org/ ) for typesetting of sheet music. While the output looks nice, the input language IMHO is quite horrible, because the underlying data/execution model is underspecified. For some parts, it tries to describe the logical structure of the score; but

[Haskell-cafe] xmonad (+ mate) evince problem?

2013-08-12 Thread Johannes Waldmann
Hi. I am using xmonad + mate (on fedora 19) and evince (PDF viewer) seems unresponsive: it reacts to my (mouse) input only after switching to another screen and back. Any hints? - Thanks, J. W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] TH splicing and recompilation checking

2013-07-16 Thread Johannes Waldmann
Hi. we are using template Haskell to splice in some code that is produced by reading and transforming the contents of another file. now, if this "other file" is touched (by editing), but not the main file, then ghc (and cabal) do not realize that the main file does need to be recompiled. is t

Re: [Haskell-cafe] What does it mean to derive "equations of restricted from" in Haskell?

2013-07-16 Thread Johannes Waldmann
Daryoush Mehrtash gmail.com> writes: > What does "restricted form" mean? non-restricted: e.g., f (f x y) z = f x (f y z)) restricted: the shape of function declarations in Haskell (where lhs is a pattern) > "definitions are terminating ... non-termination: an equation like "f x y = f y x"

[Haskell-cafe] Workshop on Termination (deadline: July 22)

2013-07-15 Thread Johannes Waldmann
) community. - Johannes. # 13th International Workshop on Termination (WST) ( full CfP see http://www.imn.htwk-leipzig.de/WST2013/ ) Centro Residenziale Universitario di Bertinoro (near Bologna, Italy). submission: July 22, 2013

Re: [Haskell-cafe] Installing Z3 on OS X 10.8.4 ( Off topic )

2013-07-01 Thread Johannes Waldmann
> Unable to locate executable for z3 well, do you really have z3 in the $PATH? what does 'which z3' answer? I used this for installation of z3: python scripts/mk_make.py --prefix=/usr/local and note that the install script says: Z3 shared libraries were installed at /usr/local/lib, make sure

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Johannes Waldmann
> Code which is part of some expression should be indented > further in than the beginning of that expression [...] Yes. Then the next question is "how much further in". My answer is: it does not matter, but make it consistent (like 4 spaces), with the implication that indentation sh

Re: [Haskell-cafe] how to debug stack overflow?

2013-06-22 Thread Johannes Waldmann
Aleksey Uymanov gmail.com> writes: > Try to use heap profiling. There is very high probability that the > problem is because of space leak. Really? Would it help in the standard example: main = print $ foldr (+) 0 [1 .. 1::Int] this leaks space (that is, cannot run in small space) only

[Haskell-cafe] how to debug stack overflow?

2013-06-22 Thread Johannes Waldmann
What is the recommended method to find the exact reason for a stack overflow (when running a Haskell program compiled with ghc)? When I compile with -prof -auto-all, and run with +RTS -xc, I see a very short call stack, which can't be right. But that's probably because I am calling some library

Re: [Haskell-cafe] ANNOUNCE: standalone-haddock-1.0

2013-06-08 Thread Johannes Waldmann
Roman Cheplyaka ro-che.info> writes: > http://feuerbach.github.io/standalone-haddock/ yes, awesome! I took me a while to figure out I need to add --package-db $HOME/.ghc/x86_64-linux-7.6.3/package.conf.d um, where's --hyperlink-source ? - J.W.

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
re general than B" in this context. Especially when A is a class of type, that takes two arguments (i.e. Unit and Arrow) and B for ones, that takes only one (like Monad, Pure,..) Thanks again! Johannes On Tue, May 28, 2013 at 11:11 PM, Tom Ellis wrote: > On Tue, May 28, 2013 at 09:09:48P

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
nted f) where pure f = UnitPointed unit newtype Kleisli f a b = Kleisli (a -> f b) instance Pointed f => Unit (Kleisli f) where unit = Kleisli pure On Tue, May 28, 2013 at 6:05 PM, Johannes Gerer wrote: > Ok, now I see a difference, why Kleisli can be used to relate > typeclass

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
Can somebody point out the relevant category theoretical concepts, that are at work here? On Tue, May 28, 2013 at 5:43 PM, Tom Ellis wrote: > On Tue, May 28, 2013 at 05:21:58PM +0200, Johannes Gerer wrote: >> That makes sense. But why does >> >> instance Monad m => ArrowApply (K

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
That makes sense. But why does instance Monad m => ArrowApply (Kleisli m) show that a Monad can do anything an ArrowApply can (and the two are thus equivalent)? On Tue, May 28, 2013 at 5:17 PM, Tom Ellis wrote: > On Tue, May 28, 2013 at 04:42:35PM +0200, Johannes Gerer wrote: >>

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
most anything. I do not understand, what this tells me! Johannes On Tue, May 28, 2013 at 3:04 PM, Anton Kholomiov wrote: > I don't understand the final part of the question but here are some comments > for the first part. > > I don't like the phrase: > > >&g

[Haskell-cafe] Type classes

2013-05-28 Thread Johannes Gerer
does transform the "m" type (in a way similar to Cokleisli). If attention needs to be paid to the details, then what are they and why did they not matter above? Thanks, Johannes ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://ww

Re: [Haskell-cafe] Generalizing unionWithKey, unionWith, ...

2013-05-28 Thread Johannes Waldmann
Jose A. Lopes ist.utl.pt> writes: > What makes it an interesting example ? it shows that your proposed type for unionWith is not reasonable. > why would you want to use undefined in that particular case? the two argument maps have disjoint key sets, so the combining function will never be call

Re: [Haskell-cafe] Generalizing unionWithKey, unionWith, ...

2013-05-28 Thread Johannes Waldmann
Jose A. Lopes ist.utl.pt> writes: > unionWith :: Ord k => (a -> b -> c) -> Map k a -> Map > k b -> Map k c what should be the result of unionWith undefined (M.singleton False 42) (M.singleton True "bar") ? perhaps you mean intersectionWith, which already has the type you want. - J.W.

Re: [Haskell-cafe] What symbol / atom/ interned-string package is currently preferred?

2013-05-09 Thread Johannes Waldmann
> https://github.com/ekmett/intern/blob/master/examples/Term.hs sure I found this but that still does not say much. I known generally what "hash consing" is (and that's why I think I might want to use this package) but I don't see what is the (implied) contract for this implementation: It looks

Re: [Haskell-cafe] What symbol / atom/ interned-string package is currently preferred?

2013-05-09 Thread Johannes Waldmann
> http://hackage.haskell.org/package/intern what does this package do? OK, I can read "efficient hash consing" but what does it mean exactly? and how would I actually use it? - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Johannes Waldmann
Byron Hale einfo.com> writes: > I was just in the process of trying to get Haskell 7.6 installed. You cannot "install Haskell 7.6". Haskell is a language. You can install a language implementation (compiler/interpreter). There may be several. You can also install a set of libraries. Thes

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Johannes Waldmann
Adrian May gmail.com> writes: > this decision to change the default syntax in GHC7 what decision? what syntax? here's the release notes (7 vs. 6) http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/release-7-0-1.html I guess you are referring to hierarchical module names? (import List => i

Re: [Haskell-cafe] Fwd: How to do automatic reinstall of all dependencies?

2013-04-25 Thread Johannes Waldmann
Alexander Kjeldaas gmail.com> writes: cabal install --upgrade-dependencies  `eval echo $(ghc-global-constraints )` for a moment I was reading "ghc --global-constraints" there ... - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:

[Haskell-cafe] what happened to alexAndPred?

2013-04-23 Thread Johannes Waldmann
Hi. I have ghc-7.6.3 and alex-3.0.5. When I build https://github.com/jwaldmann/smt-lib it breaks with Language/SMTLIB/Lexer.x:6:5: Not in scope: `alexAndPred'. It was working with alex-2.3.5. I was going t add "Can I constrain the alex version in the cabal file (I recall this is difficult for exe

Re: [Haskell-cafe] version of containers fixed by template-haskell?

2013-04-17 Thread Johannes Waldmann
Roman Cheplyaka ro-che.info> writes: > On second thought, are you trying to install it globally? locally > ghc is installed globally, and local packages should not "break" it. still cabal-install says so (and I don't dare to test ...) ___ Haskel

Re: [Haskell-cafe] version of containers fixed by template-haskell?

2013-04-17 Thread Johannes Waldmann
Roman Cheplyaka ro-che.info> writes: > ghc is the package that provides the GHC API. > Breaking it should not affect the compiler itself, since it is > statically linked. Yes. But once ghc (the package) is broken, it cannot be fixed (except by re-installing ghc (the compiler))? _

[Haskell-cafe] version of containers fixed by template-haskell?

2013-04-17 Thread Johannes Waldmann
Is it still the case that "It just doesn't work to have multiple versions of a wired-in package" (cf. http://hackage.haskell.org/trac/ghc/ticket/5704 )? ghc-7.6.2 comes with containers-0.5.0.0 and template-haskell-2.8.0.0 . It seems I can upgrade to containers-0.5.2.1 and use it with no problems

[Haskell-cafe] data types with overlapping component names (in one module)?

2013-04-16 Thread Johannes Waldmann
What is the current situation: can we have two types with overlapping component names in one module? module M where data T1 = C1 { foo :: Int } data T2 = C2 { foo :: String } It seems not (ghc says: Multiple declarations of 'foo'). This comes close: http://www.haskell.org/ghc/docs/7.6.2/html/use

Re: [Haskell-cafe] Prolog-style patterns

2013-04-09 Thread Johannes Waldmann
Yuras Shumovich gmail.com> writes: > Will not it be a nightmare to implement and maintain checker for > overlapping/unused clauses for non-linear patterns? For sure it does not look straightforward. Note that there are some results and algorithms for non-linear patterns, cf. this short survey

Re: [Haskell-cafe] Error when building executable with profiling enabled

2013-04-07 Thread Johannes Waldmann
Krzysztof Skrzętnicki gmail.com> writes: > see this documentation on profiling with TH: http://www.haskell.org/ghc/docs/7.6.1/html/users_guide/template-haskell.html#id624714 "GHC cannot load the profiled object code and use it when executing the splices." That means I do not get profiling inf

Re: [Haskell-cafe] Haskell is a declarative language? Let's see how easy it is to declare types of things.

2013-04-04 Thread Johannes Waldmann
Tom Ellis jaguarpaw.co.uk> writes: > I didn't see an example of quantifiers in the wrong place. The example was: > every x satisfies P(x,y) for some y ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/

Re: [Haskell-cafe] Haskell is a declarative language? Let's see how easy it is to declare types of things.

2013-04-04 Thread Johannes Waldmann
Albert Y. C. Lai vex.net> writes: > Quantifiers are complicated, but I don't see how explicit is more so > than implicit. [...] I have just seen recently [...] Great example. I completely agree. My feeling is that mathematicians use this principle of leaving out some of the quantifiers and p

[Haskell-cafe] Haskell is a declarative language? Let's see how easy it is to declare types of things.

2013-04-03 Thread Johannes Waldmann
I absolutely love to use Haskell when teaching (and I have several years of experience doing it). And I absolutely dislike it when I have to jump through hoops to declare types in the most correct way, and in the most natural places. This is hard to sell to the students. - Examples: 1. for exp

[Haskell-cafe] mueval, interpreter options

2013-04-02 Thread Johannes Waldmann
What am I missing? I want to use mueval to read a file that contains "instance Serial m a => Serial m (Tree a)" (as in http://hackage.haskell.org/packages/archive/smallcheck/1.0.2/doc/html/Test-SmallCheck-Series.html) so I put in my call of mueval: let Right opts = M.inter

[Haskell-cafe] package show needs QuickCheck<2.6?

2013-03-19 Thread Johannes Waldmann
Hi, I noticed that compilation of mueval (recent: 0.8.2) breaks because show (0.5) cannot be built: it seems the type of Failure changed in QuickCheck (from 2.5 to 2.6). The build succeeds with --constraint 'QuickCheck<2.6' . ___ Haskell-Cafe mailing

Re: [Haskell-cafe] package dependencies should distinguish between API and implementation?

2013-02-25 Thread Johannes Waldmann
Alexander Kjeldaas gmail.com> writes: > There's a third relation, A API-ABI-depends-on B > iff some type of B is used in the hidden binary representation > that is used in backing the API visible to A. Yes. Does this hold in the example I mentioned? > I think the only dependency [ of template

[Haskell-cafe] package dependencies should distinguish between API and implementation?

2013-02-25 Thread Johannes Waldmann
Package dependencies are modelled by a relation "A depends-on B". Shouldn't this in fact be two relations: API-depends-on and implementation-depends-on? (meaning that A API-depends-on B iff some type of B is visible to the user of A) So what we currently have is implementation-depends-on a

Re: [Haskell-cafe] package show needs upper version bound for smallcheck?

2013-02-22 Thread Johannes Waldmann
> Could the maintainers of "show" > http://hackage.haskell.org/package/show-0.4.1.2 > please add some version bound (< 1 or similar) > for the smallcheck dependency? Thanks for the quick reaction. show-0.5 now depends on smallcheck>=1.0 This works until the next API-breaking change in smallchec

[Haskell-cafe] package show needs upper version bound for smallcheck?

2013-02-20 Thread Johannes Waldmann
Since smallcheck-1.0 contains API changes - Could the maintainers of "show" http://hackage.haskell.org/package/show-0.4.1.2 please add some version bound (< 1 or similar) for the smallcheck dependency? Thanks - J.W. ___ Haskell-Cafe mailing list Has

[Haskell-cafe] how to release (on hackage) a package that needs foreign libs?

2013-02-16 Thread Johannes Waldmann
What is the recommended approach for publishing (on hackage) a package that depends on external libraries? In my case, the current version of http://hackage.haskell.org/package/satchmo (sources at https://github.com/jwaldmann/satchmo) depends on minisat-haskell-bindings (in Haskell), minisat-c-bi

[Haskell-cafe] Text.PrettyPrint.HughesPJ is sloooow (and wl-pprint-text is fast)

2013-02-04 Thread Johannes Waldmann
I was running into serious performance problems when printing moderately sized Doc and Xml data (HaXml goes via Doc). So I replace Text.PrettyPrint.HughesPJ with Text.PrettyPrint.Leijen.Text, and patched the HaXml printer in the same way. Now it is running much faster. This confirms some of the c

Re: [Haskell-cafe] Why should we write "a `par` b `pseq` (f a b)" instead of "a `par` b `par` (f a b)"?

2013-01-20 Thread Johannes Waldmann
Petr P gmail.com> writes: > Is there any reason to use >   a `par` b `pseq` (a + b) > instead of >   a `par` b `par` (a + b) (better ask this on parallel-haskell?) > It seems to me that the second variant would work as well: > The main thread would block on one of the sparked computations, I

Re: [Haskell-cafe] Cannot read a large integer on linux

2013-01-14 Thread Johannes Waldmann
> read "18780189038289e49" :: Integer this might be related: http://hackage.haskell.org/trac/ghc/ticket/5688 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] using/building ghc head?

2013-01-14 Thread Johannes Waldmann
Hi. I wanted to do some experiments with GHC Head but * I cannot use the snapshot bindist: ./configure --prefix=/opt checking for path to top of build tree... ./configure: line 2138: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: No such file or directory * I cannot compile snapshot from

[Haskell-cafe] HaskellDB-HDBC-PostgreSQL installation problem

2013-01-09 Thread Johannes . Reiher
s another error: "this package needs a unix installation". Is there any way to install pq on Windows or get the HaskellDB-HDBC-PostgreSQL in another way? Thanks for your advice Johannes Reiher ___ Haskell-Cafe mailing list Hask

Re: [Haskell-cafe] Example programs with ample use of deepseq?

2013-01-08 Thread Johannes Waldmann
http://article.gmane.org/gmane.comp.lang.haskell.parallel/340 (with follow-up message about rseq => rdeepseq) - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Hoogle index completeness

2012-12-19 Thread Johannes Waldmann
> Hayoo has them all [ .. ] but Hoogle is better with types? it seems Hayoo only does exact (string?) match on types, while Hoogle also knows about polymorphisms, permutations etc. E.g., search for "String -> Int". Hoogle finds length :: [a]-> Int as well, I think Hayoo doesn't. J.W. __

Re: [Haskell-cafe] Exploring Programming Language Theory

2012-12-09 Thread Johannes Waldmann
Stephen Tetley gmail.com> writes: > Also Franklyn Turbak and David Gifford's "Design Concepts for > Programming Languages" is very good (and new!) but huge. Yes! I like that book very much, and I use it for teaching semantics and compilation of programming languages. Semantics - by writing inte

Re: [Haskell-cafe] hsql-mysql encoding issues

2012-10-24 Thread Johannes Waldmann
Daniel van den Eijkel gmx.net> writes: > ... but I use HDBC and I'm happy with it. including its handling of character encodings? (That is, do you have, e.g., texts with umlauts in your data?) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.or

[Haskell-cafe] hsql-mysql encoding issues

2012-10-23 Thread Johannes Waldmann
Hi. I am using hsql-(mysql-)1.8.2 When compiled with ghc-7.6, the resulting executable does not seem to be able to read strings from the DB correctly (umlauts do "vanish") while it worked with hsql-(mysql-)1.8.1 and ghc-7.4. the mysql server says (show variables) | character_set_client

Re: [Haskell-cafe] Solving integer equations in Haskell

2012-10-15 Thread Johannes Waldmann
Justin Paston-Cooper gmail.com> writes: > Can anyone suggest a library written in Haskell which can solve equations > of the form xM(transpose(x)) = y, where x should be an integer vector, > M is an integer matrix and y is an integer? when in doubt, use brute force: write this as a constrain

Re: [Haskell-cafe] CPS Streams

2012-10-10 Thread Johannes Waldmann
jeff p gmail.com> writes: > I've always thought that the essence of iteratees is just CPS for sure, at some level of abstraction this ought to be true, since CPS simulates call-by-value in a call-by-name language, cf. Gordon Plotkin: Call-by-Name, Call-by Value and the Lambda Calculus TCS , Vo

[Haskell-cafe] ghc-mtl, hint, mueval for ghc-7.6 ?

2012-10-08 Thread Johannes Waldmann
While porting some code to 7.6, I'm stuck here: Preprocessing library ghc-mtl-1.0.1.1... [1 of 1] Compiling Control.Monad.Ghc ( Control/Monad/Ghc.hs, dist/build/Control/Monad/Ghc.o ) Control/Monad/Ghc.hs:29:48: No instance for (DynFlags.HasDynFlags Ghc) this seems to block hint and mueval. I

Re: [Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-06 Thread Johannes Waldmann
wren ng thornton freegeek.org> writes: > As for whether the default should be "infix 9" instead of "infixl 9" ... that was exactly the point of my message. - J. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/l

[Haskell-cafe] referential transparency? (for fixity of local operators)

2012-10-05 Thread Johannes Waldmann
I was really surprised at the following: *Main> 1 + 2 * 3 7 *Main> ( \ (+) (*) -> 1 + 2 * 3 ) (+) (*) 9 because I was somehow assuming that either a) the Prelude fixities of the operators are kept b) or they are undefined, so the parser rejects. but the Haskell standard says "Any operator lack

Re: [Haskell-cafe] GHC 6.13 and GHC 7.6 in parallel on Linux

2012-09-28 Thread Johannes Waldmann
>How is it possible to run 2 different versions of GHC if you installed the binary packages in standard locations, look in /usr/local/bin/ghc* : you have ghc-6.12.3, ghc-7.6.1 etc. and each one knows how to find their libraries. you can even say "cabal install --with-ghc=ghc-7.6.1 foo"

Re: [Haskell-cafe] ANNOUNCE: Sylvia, a lambda calculus visualizer

2012-09-28 Thread Johannes Waldmann
> Sylvia is a lambda calculus visualizer. Such a thing is certainly nice to have. I use this one for teaching: http://joerg.endrullis.de/lambdaCalculator.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/l

Re: [Haskell-cafe] ANNOUNCE: grid-1.1

2012-09-10 Thread Johannes Erber
could be done much simpler!? Best, Johannes On 06/09/12 10:42, Amy de Buitléir wrote: I'm happy to announce a new package called grid: http://hackage.haskell.org/package/grid https://github.com/mhwombat/grid/wiki (wiki) Grid provides tools for working with regular arrangemen

Re: [Haskell-cafe] Wanted: Haskell binding for libbdd (buddy)

2012-08-21 Thread Johannes Waldmann
Peter Gammie gmail.com> writes: > My hBDD bindings are on Hackage. Great! Perhaps add "category: logic" in the cabal file? J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Wanted: Haskell binding for libbdd (buddy)

2012-08-20 Thread Johannes Waldmann
Are there any Haskell bindings for BDD libraries (reduced ordered binary decision diagrams)? E.g., it seems "buddy" is commonly used http://packages.debian.org/squeeze/libbdd-dev and it has an Ocaml binding. Yes, there is http://hackage.haskell.org/package/obdd but I need better performance (with

Re: [Haskell-cafe] ghc-7.4 on CentOS-5.8 ?

2012-06-28 Thread Johannes Waldmann
Tim Docker dockerz.net> writes: > I need to use a more recent version of gcc Thanks! Yes, that seems to be it. When building gcc didn't work, it took me a while to figure out that I was running into this bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51935 so I am using mpfr-3.0.1 (inst

[Haskell-cafe] ghc-7.4 on CentOS-5.8 ?

2012-06-27 Thread Johannes Waldmann
Dear all, I need a recent ghc on a not-so-recent (?) CentOS. The ghc binary package (7.2 or 7.4) does not work because of a mismatch in the libc version. ghc-7.0 is working but when I use it to compile 7.4, it breaks with some linker error (relocation R_X86_64_PC32 ...) it also suggests "recomp

Re: [Haskell-cafe] Request for optimizing help.

2012-06-24 Thread Johannes Waldmann
First, why do you think your code is non-optimal? you don't show your main program, so we don't know what you're measuring. Just by looking at some types (and not analysing the algorithm): 11 data FilterState a = FilterState { 14   , taps :: [a] -- current delay tap stored values the "State" re

[Haskell-cafe] not enough fusion?

2012-06-24 Thread Johannes Waldmann
Dear all, while doing some benchmarking (*) I noticed that function s1 is considerably faster than s2 (but I wanted s2 because it looks more natural) (for n = 1, s1 takes 20 s, s2 takes 13 s; compiled by ghc-7.4.2 -O2) s1 :: Int -> Int s1 n = sum $ do x <- [ 0 .. n-1 ]

Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-05-31 Thread Johannes Waldmann
Jonathan Geddes gmail.com> writes: > I love Haskell. It is my absolute favorite language. > But I have a very hard time finding places where I can actually use it! have you considered "your head" as such a place that should be easy to find. even "just for specifying things", Haskell is tremend

Re: [Haskell-cafe] Formalisation for types of monads

2012-05-22 Thread Johannes Waldmann
Ertugrul Söylemez ertes.de> writes: > Note about []: Don't even mention foldl. The folding combinator > for lists is foldr, period. Amen. I ignore foldl in teaching but it will appear under the name of IEnumerable.Aggregate(z, f) (from Linq). Note, the Linq designers got the ar

Re: [Haskell-cafe] Threads and hGetLine

2012-05-02 Thread Johannes Waldmann
> There are two threads, one which is waits on input via > hGetLine > and another, which should terminate this thread or close this handle. like this? The trick is to fork the blocking call (hGetLine) and wait on an MVar. That way, the kill signal can be handled: {-# language PatternSignatures

Re: [Haskell-cafe] static linking with ghc?

2012-04-22 Thread Johannes Waldmann
Scott Lawrence gmail.com> writes: > Adding -optl-pthread fixes it for me. great! in my case, I also needed to add '-pgml g++' and together, this seems to work. Thanks. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/ma

[Haskell-cafe] static linking with ghc?

2012-04-22 Thread Johannes Waldmann
Hi. I want to produce a statically linked executable. I am trying 'ghc --make -fforce-recomp -static -optl-static Main' but it gives lots of errors like (.text+0xfa): undefined reference to `pthread_mutex_unlock' collect2: ld returned 1 exit status A similar thing is mentioned here (see Cave

Re: [Haskell-cafe] ANN: signed-multiset-0.1

2012-04-18 Thread Johannes Waldmann
Stefan Holdermans vectorfabrics.com> writes: > This package provides an efficient implementation of so-called > signed multisets, which generalise multisets by allowing for > negative membership. SignedMultiset a = Data.Map.Map a Integer so what do I gain by using your library? (what is the API

[Haskell-cafe] is this an arrow?

2012-04-13 Thread Johannes Waldmann
Dear Cafe, I have the following types: type Computer a b = ( a -> IO ( Maybe b ) ) type Transformer a b c d = Computer a ( b, c -> d ) For example, a SAT solver: minisat :: Computer CNF Assignment, and when I use it to solve an application problem via transformation to SAT, I need t :: Transfo

Re: [Haskell-cafe] mueval leaving behind tmp files

2012-04-02 Thread Johannes Waldmann
> mueval-0.8.1.1 this is actually 0.8.2 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] mueval leaving behind tmp files

2012-04-02 Thread Johannes Waldmann
The following program prints Right ("test","Bool","True") as it should, but it leaves behind in /tmp two files (name is a long string of digits) and an empty directory (name is ghcN_N). ... and it deletes the input file (/tmp/Main.hs). That's not nice. Ideally, I would want to read input fr

[Haskell-cafe] for = flip map

2012-03-28 Thread Johannes Waldmann
Good: we have mapM, and we have forM ( = flip mapM ) . Sure this is just a convenience, and indeed "forM xs $ \ x -> do ..." is quite handy, especially if "xs" is really small, and "..." is some larger expression. Bad: we have map, but we are missing: for ( = flip map ) . The function is v

[Haskell-cafe] ghci can't load file whose name contains non-ASCII chars?

2012-03-28 Thread Johannes Waldmann
I must be making some obvious mistake here, but I'm not seeing it. The file name contains O-umlaut, and the OS handles it fine, but ghci does not like it (although it accepts umlauts in the contents of the file (UTF-8) e.g., as a module name) $ cat fÖÖbar.hs main = print $ product [1..100] $ ghc

Re: [Haskell-cafe] Polymorphic addition function with variable number of arguments?

2012-03-13 Thread Johannes Waldmann
The problem seems to be that numeric literals are polymorphic. With your code, this works: *Main> let x = 8 :: Int *Main> add x x x :: Int 24 *Main> add x x :: Int 16 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailma

Re: [Haskell-cafe] Polymorphic addition function with variable number of arguments?

2012-03-13 Thread Johannes Waldmann
> Can someone tell me why this is not working that "someone" is actually ghci: Prelude> instance (Num a, Add a b) => Add (a -> b) where add x y = add (x + y) :8:30: Expecting one more argument to `Add (a -> b)' In the instance declaration for `Add (a -> b)' _

Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12

2012-03-11 Thread Johannes Waldmann
> cabal install --extra-include-dirs=. gtksourceview2 yes this works. thanks! - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12

2012-03-11 Thread Johannes Waldmann
Sounds good - but my build fails on ubuntu-11.10: Building gtksourceview2-0.12.3... Preprocessing library gtksourceview2-0.12.3... ./gtksourceview2.h:10:48: fatal error: gtksourceview/gtksourceundomanager.h: No such file or directory compilation terminated. gtk2hsC2hs: Error during preprocessing

Re: [Haskell-cafe] help with safecopy + acid-state

2012-01-31 Thread Johannes Waldmann
> > Can I really rename  old.T => new.T_orig ? > > It looks as if then tries to load the wrong acid-state snapshot. > > The name of your data type doesn't matter as acid-state doesn't store > that on the disk. I think it does - because file names are state/T/*.log and so on? J.W.

Re: [Haskell-cafe] help with safecopy + acid-state

2012-01-30 Thread Johannes Waldmann
Felipe Almeida Lessa gmail.com> writes: > > data T_orig = T_orig Foo > > $(deriveSafeCopy 0 'base ''T_orig) > > data T = T Foo Bar > > $(deriveSafeCopy 0 'extension ''T) > > instance Migrate T where type MigrateFrom T = T_Orig ... > > As you can read from deriveSafeCopy's documentation [1], you

Re: [Haskell-cafe] Stuck on HXT basics

2012-01-30 Thread Johannes Waldmann
> Couldn't match expected type `Data.Tree.NTree.TypeDefs.NTree XNode' > with actual type `hxt-8.5.4:Data.Tree.NTree.TypeDefs.NTree > hxt-8.5.4:Text.XML.HXT.DOM.TypeDefs.XNode' perhaps you have installed several (conflicting) versions of pack

[Haskell-cafe] help with safecopy + acid-state

2012-01-27 Thread Johannes Waldmann
Dear all, I can't quite get safecopy to work with acid-state: old version of code : data T = T Foo $(deriveSafeCopy 0 'base ''T) new version : data T_orig = T_orig Foo $(deriveSafeCopy 0 'base ''T_orig) data T = T Foo Bar $(deriveSafeCopy 0 'extension ''T) instance Migrate T where type Migrat

Re: [Haskell-cafe] Need advice: Haskell in Web Client

2012-01-18 Thread Johannes Waldmann
dokondr gmail.com> writes: > It would be great if I could write Web client code in pure Haskell [...] not exactly Haskell, but you may want to have a look at OPA http://opalang.org/ the idea is that you write all of the application in one (statically typed, functional) language and the framew

Re: [Haskell-cafe] haxr standalone server?

2012-01-05 Thread Johannes Waldmann
Michael Snoyman snoyman.com> writes: > It seems like the issue is that HaXR uses CGI, whereas you want to tie > it in with a web server, correct? Yes. > There's a deprecated package[1] to > allow CGI apps to be run on any WAI handler (such as Warp). why deprecated? what's the problem with th

[Haskell-cafe] haxr standalone server?

2012-01-05 Thread Johannes Waldmann
How could I use haxr (http://www.haskell.org/haskellwiki/HaXR) to build a stateful server? It should listen on some port, and fork threads (inside Haskell land) to handle incoming calls. Any of the Haskell web frameworks can do this? I guess this is the same question as: http://www.haskell.org/p

[Haskell-cafe] cabal install --hyperlink-source ?

2011-12-02 Thread Johannes Waldmann
Hello. I can do "cabal install --enable-documentation" which is nice because it does configure, build, haddock and copy in one go, but I don't see how to pass options from "cabal install" to "cabal haddock" (e.g., --hyperlink-source) Any hints appreciated, J.W. signature.asc Description: Ope

Re: [Haskell-cafe] Is SmallCheck maintained?

2011-11-22 Thread Johannes Waldmann
provided. On the other hand, that could easily be forked off as a student project, so there is no hurry. Best, Johannes. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] FFI / enums

2011-11-07 Thread Johannes Waldmann
Does this work with "ghc -XForeignFunctionInterface" ? http://en.wikibooks.org/wiki/Haskell/FFI#Enumerations I am getting a syntax error right after "#{". But then, the description is for "hsc2hs" (not ghc). And it mentions macros, while C meanwhile has "real" enums. Well, at leat one can write

Re: [Haskell-cafe] wxhaskell : how to generate an event?

2011-10-11 Thread Johannes Waldmann
Dmitriy Nikitinskiy bel.ru> writes: > http://snipplr.com/view/17538/ Looks good, and seems to work. Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is there a DFA library?

2011-10-10 Thread Johannes Waldmann
> ... things like minimization, completion, etc. http://autolat.imn.htwk-leipzig.de/haddock/autolib-fa-1.1/ git clone git://autolat.imn.htwk-leipzig.de/git/autolib Enjoy - J.W. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell

[Haskell-cafe] wxhaskell : how to generate an event?

2011-10-10 Thread Johannes Waldmann
Dear all, in wxHaskell (core) I can set and get event handlers http://hackage.haskell.org/packages/archive/wxcore/0.12.1.7/doc/html/Graphics-UI-WXCore-Events.html but how is it possible to create events (programmatically) and somehow feed them into the "main event handling loop"? I think I need t

[Haskell-cafe] static analysis (call graph) tools?

2011-09-15 Thread Johannes Waldmann
ifier" (eclipse: "open call hierarchy") (with correct handling of scoping and modules)? Thanks - Johannes. signature.asc Description: OpenPGP digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.

[Haskell-cafe] Leipzig (Germany) Haskell Workshop 7 October - Program and Registration

2011-09-09 Thread Johannes Waldmann
Dear all, the 6th Haskell in Leipzig workshop, on October 7, will present an absolutely thrilling mixture of tutorials and talks, with special emphasis on parallel programming. for details and registration, http://portal.imn.htwk-leipzig.de/events/hal6-haskell-workshop See you - Johannes

Re: [Haskell-cafe] Grammar hacker in Haskell

2011-07-22 Thread Johannes Waldmann
Stephen Tetley gmail.com> writes: > "Compilers: Principles, Techniques, and Tools" by Aho et al. though > the presentation in this book is quite formal. you make that sound like a bad thing ... even the publisher seems to think so, and came up with a slogan that indeed must be the most counte

Re: [Haskell-cafe] Trying to make a calculator

2011-07-18 Thread Johannes Waldmann
> But now my assignment is a lot tougher than I thought so I'll need some > guidelines. I'm pretty sure your course instructor has already given you the exact guidelines that are required, in her lecture. There's hundreds of ways to "make a calculator", and it really depends on what the teache

  1   2   3   4   >