RE: cross module optimization issues
Hi John, I'm vaguely curious, and have next week off, so if you can provide the code, and directions for running in both variants and the test case, I'll take a look. Please email me at ndmitchell -AT- gmail.com though, as I loose this email address at 11pm tonight :-) Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Peyton-Jones Sent: 21 November 2008 10:34 am To: John Lato Cc: glasgow-haskell-users@haskell.org; Don Stewart Subject: RE: cross module optimization issues | This project is based on Oleg's Iteratee code; I started using his | IterateeM.hs and Enumerator.hs files and added my own stuff to | Enumerator.hs (thanks Oleg, great work as always). When I started | cleaning up by moving my functions from Enumerator.hs to MyEnum.hs, my | minimal test case increased from 19s to 43s. | | I've found two factors that contributed. When I was cleaning up, I | also removed a bunch of unused functions from IterateeM.hs (some of | the test functions and functions specific to his running example of | HTTP encoding). When I added those functions back in, and added | INLINE pragmas to the exported functions in MyEnum.hs, I got the | performance back. | | In general I hadn't added export lists to the modules yet, so all | functions should have been exported. I'm totally snowed under with backlog from my recent absence, so I can't look at this myself, but if anyone else wants to I'd be happy to support with advice and suggestions. In general, having an explicit export list is good for performance. I typed an extra section in the GHC performance resource http://haskell.org/haskellwiki/Performance/GHC to explain why. In general that page is where we should document user advice for performance in GHC. I can't explain why *adding* unused functions would change performance though! Simon ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: [Haskell-cafe] Possible issue with Hoogle and Haddock?
I was noticing recently that there seems to be a problem with Hoogle and Haddock. In particular, I just hoogled bracket and got the following result: bracket :: IO a - a - IO b - a - IO c - IO c Clearly this is the wrong type, as it should be bracket :: IO a - (a - IO b) - (a - IO c) - IO c Is this a bug? Is is something that's well-known? Yes, it's a known bug: http://hackage.haskell.org/trac/ghc/ticket/2584 I can make a work around for Hoogle (well, I can write a workaround in the Hoogle specific code of Haddock), but was hoping that the bug would be fixed before 6.10. I guess its now worth making the Hoogle specific fix. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: Bug in GHC6.10.1?
Hi, Floating point numbers are just inaccurate, so the results you see aren't too surprisingly. Interestingly enough, using Hugs, I get the right answer in both cases - so its possible it's a bug, but unlikely. If you do want exact floating point manipulation then use rational numbers instead, for example: 3.0 * 0.2 :: Rational 3%5 Which should be read as a fraction, 3/5, which is the right answer. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of José Pedro Correia Sent: 14 November 2008 2:33 pm To: glasgow-haskell-users@haskell.org Subject: Re: Bug in GHC6.10.1? Hello I was wondering if there is a bug in GHC 6.10.1 regarding number precision. As an example, in GHCi with: 3.0 * 0.2 I get: 0.6001 Although: 2.0 * 0.2 0.4 I have GHC 6.10.1 on Mac OS X 10.5. Is this a known bug or should I report it? Best regards Zé Pedro ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: [Haskell-cafe] getLine and ^C on Windows
Hi I have the same experience with Windows XP and getContents, so I think it's the entire IO layer on Windows, rather than just getLine on Vista. This is being tracked here http://hackage.haskell.org/trac/ghc/ticket/2758 Thanks Neil I've had the same experience with runghc in GHC 6.10.1 on Vista. /g 2008/11/12 Lyle Kopnicky [EMAIL PROTECTED]: Hi folks, I'm using System.IO.getLine to read input in my program. I've compiled it on Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the program is waiting for input, it will get stuck. No keypresses can get me out of the program - I have to kill the shell. I've tried cmd.exe, Powershell and cygwin - same behavior. I'm sure editline would work better, but it's overkill. I just want to read lines of text and don't need fancy edit behavior. And I think editline complicates the build process. I also want my program to work right in non-interactive mode, reading redirected input. Am I missing something? Thanks, Lyle ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- I am in here ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Searching for ADT patterns with elem and find
I guess one drawback compared to Neil's suggested use of any (and staying with a separate isTypeB) is that your solution will iterate over the entire list, regardless of an early hit. Nope, it will stop on the first one - Haskell is lazy like that :-) Thanks, Neil From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Keir Sent: 12 November 2008 1:45 pm To: Tom Nielsen Cc: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Searching for ADT patterns with elem and find Thanks Tom, That is indeed a very elegant solution; I too often forget about the wonders of list comprehension. I guess one drawback compared to Neil's suggested use of any (and staying with a separate isTypeB) is that your solution will iterate over the entire list, regardless of an early hit. But I don't think your second (as-pattern) solution for findBs is ugly; I quite like it actually. Cheers, Paul -Original Message- From: Tom Nielsen [mailto:[EMAIL PROTECTED] Sent: Wed 12/11/2008 12:39 To: Paul Keir Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Searching for ADT patterns with elem and find somebody pointed out a few months back that list comprehensions do this nicely: containsTypeB ts = not $ null [x | (B x) - ts] no need for defining isTypeB. not quite sure how you would write findBs :: [T]-[T] succinctly; maybe findBs ts = [b | b@(B _) - ts] or findBs ts = [B x | (B x) - ts] both of them compile but the first is ugly and the second is inefficient (Tags a new T for every hit). Tom 2008/11/12 Paul Keir [EMAIL PROTECTED]: Hi All, If I have an ADT, say data T = A String Integer | B Double | C deriving(Eq) and I want to find if a list (ts) of type T contains an element of subtype B Double, must my containsTypeX function use a second isTypeX function as follows: isTypeB :: T - Bool isTypeB (B _) = True isTypeB _ = False containsTypeB :: [T] - Bool containsTypeB ts = maybe False (\x - True) (find isTypeB ts) I understand that while something like find C ts will work, find (isTypeB _) ts will not, but is there no such thing as a pattern combinator(?), or lambda that could help with this situation. I find I have many individual isTypeB functions now. Regards, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Proof that Haskell is RT
It's possible that there's some more direct approach that represents types as some kind of runtime values, but nobody (to my knowledge) has done that. It don't think its possible - I tried it and failed. Consider: show (f []) Where f has the semantics of id, but has either the return type [Int] or [Char] - you get different results. Without computing the types everywhere, I don't see how you can determine the precise type of []. Thanks Neil On Wed, Nov 12, 2008 at 12:39 PM, Luke Palmer [EMAIL PROTECTED] wrote: On Wed, Nov 12, 2008 at 3:21 AM, Jules Bean [EMAIL PROTECTED] wrote: Andrew Birkett wrote: Hi, Is a formal proof that the Haskell language is referentially transparent? Many people state haskell is RT without backing up that claim. I know that, in practice, I can't write any counter-examples but that's a bit handy-wavy. Is there a formal proof that, for all possible haskell programs, we can replace coreferent expressions without changing the meaning of a program? The (well, a natural approach to a) formal proof would be to give a formal semantics for haskell. Haskell 98 does not seem that big to me (it's not teeny, but it's nothing like C++), yet we are continually embarrassed about not having any formal semantics. What are the challenges preventing its creation? Luke ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Searching for ADT patterns with elem and find
containsTypeB ts = not $ null [x | (B x) - ts] No need for the brackets on the left of the -: not $ null [x | B x - ts] findBs ts = [b | b@(B _) - ts] or findBs ts = [B x | (B x) - ts] both of them compile but the first is ugly and the second is inefficient (Tags a new T for every hit). If optimised does it really create a new B tag for each node? That seems like something that could be optimised away by the compiler. Either way, the difference is probably minimal. (There may be possible space leaks if the compiler did share the B, but I can't think of any off hand) Thanks Neil 2008/11/12 Paul Keir [EMAIL PROTECTED]: Hi All, If I have an ADT, say data T = A String Integer | B Double | C deriving(Eq) and I want to find if a list (ts) of type T contains an element of subtype B Double, must my containsTypeX function use a second isTypeX function as follows: isTypeB :: T - Bool isTypeB (B _) = True isTypeB _ = False containsTypeB :: [T] - Bool containsTypeB ts = maybe False (\x - True) (find isTypeB ts) I understand that while something like find C ts will work, find (isTypeB _) ts will not, but is there no such thing as a pattern combinator(?), or lambda that could help with this situation. I find I have many individual isTypeB functions now. Regards, Paul ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Searching for ADT patterns with elem and find
Hi Paul, maybe False (\x - True) (find isTypeB ts) This can be more neatly expressed as: isJust (find isTypeB ts) But your entire thing can be expressed as: containsTypeB ts = any isTypeB ts I recommend reading through the Prelude interface and the List interface, it has many useful functions that will help. Thanks Neil From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Keir Sent: 12 November 2008 10:09 am To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Searching for ADT patterns with elem and find Hi All, If I have an ADT, say data T = A String Integer | B Double | C deriving(Eq) and I want to find if a list (ts) of type T contains an element of subtype B Double, must my containsTypeX function use a second isTypeX function as follows: isTypeB :: T - Bool isTypeB (B _) = True isTypeB _ = False containsTypeB :: [T] - Bool containsTypeB ts = maybe False (\x - True) (find isTypeB ts) I understand that while something like find C ts will work, find (isTypeB _) ts will not, but is there no such thing as a pattern combinator(?), or lambda that could help with this situation. I find I have many individual isTypeB functions now. Regards, Paul == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] compilation question
Hi The one way to test this is to benchmark, everything else will just be peoples random guesses. As for my random guess, eval should be significantly faster than peval in Hugs, and probably slightly faster than peval in GHC. I don't see why you think peval is efficient - monads /= efficiency, they merely are an extra layer over standard evaluation. If you use the IO monad and some careful annotations you could hope to draw with eval, but just accept the beauty that is pure functional programming and smile :-) Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Padawitz Sent: 11 November 2008 5:49 pm To: haskell-cafe@haskell.org Cc: Hubert Wagner Subject: [Haskell-cafe] compilation question At first a type of arithmetic expressions and its generic evaluator: data Expr = Con Int | Var String | Sum [Expr] | Prod [Expr] | Expr :- Expr | Int :* Expr | Expr :^ Int data ExprAlg a = ExprAlg {con :: Int - a, var :: String - a, sum_ :: [a] - a, prod :: [a] - a, sub :: a - a - a, scal :: Int - a - a, expo :: a - Int - a} eval :: ExprAlg a - Expr - a eval alg (Con i) = con alg i eval alg (Var x) = var alg x eval alg (Sum es) = sum_ alg (map (eval alg) es) eval alg (Prod es) = prod alg (map (eval alg) es) eval alg (e :- e') = sub alg (eval alg e) (eval alg e') eval alg (n :* e) = scal alg n (eval alg e) eval alg (e :^ n) = expo alg (eval alg e) n Secondly, a procedural version of eval (in fact based on continuations): data Id a = Id {out :: a} deriving Show instance Monad Id where (=) m = ($ out m); return = Id peval :: ExprAlg a - Expr - Id a peval alg (Con i) = return (con alg i) peval alg (Var x) = return (var alg x) peval alg (Sum es) = do as - mapM (peval alg) es; return (sum_ alg as) peval alg (Prod es) = do as - mapM (peval alg) es; return (prod alg as) peval alg (e :- e') = do a - peval alg e; b - peval alg e'; return (sub alg a b) peval alg (n :* e) = do a - peval alg e; return (scal alg n a) peval alg (e :^ n) = do a - peval alg e; return (expo alg a n) My question: Is peval less time- or space-consuming than eval? Or would ghc, hugs et al. optimize eval towards peval by themselves? Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] generalized list comprehensions
Generalised? Heck, I don't use list comprehension at all! :-P Perhaps you should! :-) You definitely should! Take a look at the Uniplate paper for some wonderful concise uses of list comprehensions for abstract syntax tree traversals. If you use a language like F# they become even more common - due to a clunkier syntax for lambdas, less library functions and no operator sections. In my F# I rarely use a map at all. But my faviourite list comprehension trick was shown to me by Colin Runciman: prettyPrint b (lhs :+: rhs) = ['('|b] ++ f lhs ++ + ++ f rhs ++ [')'|b] Imagine b represents whether something should be bracketed or not. In general: if boolean then [value] else [] Can be written as: [value | boolean] Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] pure programs
System.Info is broken. os has the wrong type. And the wrong value! I have not installed mingw32 on this machine, mingw32 isn't even an os... /me has goal of having os on Linux report wine1.1.7 Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Efficient parallel regular expressions
Hi Martijn, It's not that tricky if you do a regular expression state machine yourself, but that's probably a bit too much work. One way to get a speed up might be to take the regular expressions a,b,c,d and generate a regex a+b+c+d, and one a+b. You can then check any string s against a+b+c+d, if that matches check a+b, if that matches check a. At each stage you eliminate half the regular expressions, which means a match will take log n, where n is the number of regular expressions. This assumes the underlying regular expression engine constructs a finite state machine, making it O(m) where m is the length of the string to match. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Martijn van Steenbergen Sent: 04 November 2008 5:05 pm To: Haskell Cafe Subject: [Haskell-cafe] Efficient parallel regular expressions Hello all, For my mud client Yogurt (see hackage) I'm currently working on improving the efficiency of the hooks. Right now several hooks, each consisting of a regex and an action can be active at the same time. Every time a line of input is available (usually several times a second) I run the line through all the available regexes and execute the first matching action. I figured this is not the cleverest approach and it'd be better if I |'ed all regexes into one big DFA. However, how do I then find out which of the original hooks matched and so which action to execute? As far as I know there's no way to do that with Text.Regex. Alex looks promising but is really only an executable and doesn't offer an API. I've also found mr. João Saraiva's HaLex but I don't know if that was meant to be used seriously. Does anyone have any experience with this? What's the best way to achieve this? Thanks much, Martijn. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] code generation
I think using Template Haskell for your work would fit very nicely, so is a good choice to learn :-) I already got used to TH a bit, but I am not sure if it is appropriate for my purpose, or at least not completely. I want to load Haskell code into my program at runtime in an abstract representation (as TH), modify it and then type-check it or coerce it into a value (or execute it). For me it looks like I need a combination of Hint and TH. Perhaps. You might be able to use the GHC API to get some of what you want too. However, Hint can only interpret strings and to get a string from a QExp I have to enter the IO Monad using runQ. So, wouldn't it deteriorate my performance to do it all in the IO? Is there another way? I wouldn't worry about performance just yet. In general, Haskell code in the IO Monad is just as efficient as normal code - the IO Monad gets almost entirely optimised away by GHC. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6?
Duncan, I believe the major darcs issue is the changed GADT implementation between 6.6, so that neither 6.6 or 6.8 is a superset/subset of the other - leading to a situation where they have to use a common subset of both. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Duncan Coutts Sent: 29 October 2008 10:29 am To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] list; haskell-cafe Subject: Re: [Haskell-cafe] Poll: Do you need to be able to build darcs from source on GHC 6.6? On Mon, 2008-10-27 at 19:24 -0700, Jason Dagit wrote: Hello, I would like to find out if any darcs users who build from the source are still using ghc 6.6? I'd just like to point out (again ;-) ) than it's not that hard to support older platforms. The only constraint is that people not squeal at the sight of bundled code. The bundling can be done in such a way that it's not a maintenance burden, indeed it can remove the need to maintain internal equivalents of external libs. For example for an external package foo, we could put the latest stable version of it in lib/foo and in the .cabal file say something like: flag external-foo description: Use the external package foo, or the bundled version default: True executable whatever if flag(external-foo) build-depends: foo == 1.* else hs-source-dirs: lib/foo And I think that's it for simple external packages (though I've not tested). For external packages that use C files or link to C code it needs a bit more to bundle, but not a lot more. In either case the internal code should be able to import the standard module name without using any CPP. The advantage of course is less cpp, a single API, and not having to test two implementations (because the bundled impl is the same as the external impl). Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Why 'round' does not just round numbers ?
Hi, That is a fairly standard implementation of rounding for financial institutions. Consider sum . map round Over the list [3.5,2.5] With rounding to the nearest even integer for 0.5's you get 6, otherwise if you always round up you get 7. If you bias towards rounding up you get a general upwards trend as numbers are rounded, which is bad, while the even condition ensures that statistically it averages to the same thing. For more details see: http://en.wikipedia.org/wiki/Rounding#Round-to-even_method Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of L.Guo Sent: 27 October 2008 9:49 am To: MailList Haskell-Cafe Subject: [Haskell-cafe] Why 'round' does not just round numbers ? Hi all: I just read about definitions of Prelude [1], and noticing that. In 6.4.6 Coercions and Component Extraction, it discribes like this: round x returns the nearest integer to x, the even integer if x is equidistant between two integers. I think this is unresonable. then try it in GHC 6.8.3. Prelude round 3.5 4 Prelude round 2.5 2 Is there any explanation about that ? [1] The Haskell 98 Report: Predefined Types and Classes http://haskell.org/onlinereport/basic.html Regards -- L.Guo 2008-10-27 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] RE: [Haskell] Current XML libraries status
Redirected to haskell-cafe, since that's where all discussions should go (haskell = announcments only) Does some one have made performance tests on the different XML libraries for Haskell? I have a 20MB xml file that I want to read. I remember from my earlier experiments (years ago) that all libraries were too slow and were consuming too much memory. For my XML needs, I ended up just using the TagSoup library to extract the parts I wanted. At least this allows lazy processing of large files (a typical file is in the 1 to 4 GB range). Performance is acceptable, and Neil is rumored to have a plan to improve it further. I have a plan, I have the pseudo-code, and I have the notes. I currently don't have the time - but hopefully I'll find the time at some point. Thanks Nmeil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Fwd: enhancing type classes with properties
Hi Alberto, Take a look at ESC/Haskell and Sound Haskell, which provide mechanisms for doing some of the things you want. I don't think they integrate with type classes in the way you mention, but I think that is just a question of syntax. http://www.cl.cam.ac.uk/~nx200/ Thanks Neil This material is sales and trading commentary and does not constitute investment research. Please follow the attached hyperlink to an important disclaimer www.credit-suisse.com/emea/legal outbind://4/www.credit-suisse.com/emea/legal From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alberto G. Corona Sent: 22 October 2008 1:43 pm To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Fwd: enhancing type classes with properties I´m just thinking aloud, but, because incorporating deeper mathematics concepts has proven to be the best solution for better and more flexible programming languages with fewer errors, I wonder if raising the type classes incorporating axioms can solve additional problems. At first sight it does: class Abelian a where (+) :: a - a - a property ((+))= a+b == b+a this permits: 1- safer polimorphism: I can safely reuse the operator + if the type and the property is obeyed. The lack of ability to redefine operators is a problem for DSLs that must use wreid symbols combinations with unknow meanings. To use common operators with fixed properties is very good. the same aplies for method names. 2- the compiler can use the axions as rewrite rules. 3- in debugging mode, it is possible to verify the axiom for each value a generated during execution. Thus, a generator is not needed like in quickcheck. The logic to quickcheck can be incorporated in the debugging executable. 3 guaranties that 1 and 2 are safe. a type class can express a relation between types, but it is not possible to define relation between relations. == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] code generation
We try to learn functional programs from examples, but our system is not yet ported to Haskell, though we are working on it. However, we thought about using TH. Do you have any pointers to papers, etc. ? You'll find our project, system and papers here: http://www.cogsys.wiai.uni-bamberg.de/effalip/ I've only had a quick glance at the description however it looks like you should have a look at derive ( http://hackage.haskell.org/cgi-bin/hackage-scripts/package/derive, http://www-users.cs.york.ac.uk/~ndm/derive/ ) which I think tries to do a similar job. It has similarities, but there are many differences too. I'd certainly recommend taking a look around derive to get a feel for how to do Template Haskell stuff, and to look at the derivation by guess thing - see the manual, and the paper at: http://www-users.cs.york.ac.uk/~ndm/derive/ (Deriving Generic Functions by Example). I think using Template Haskell for your work would fit very nicely, so is a good choice to learn :-) To learn Template Haskell, I recommend you look at the Haddock documentation page: http://hackage.haskell.org/packages/archive/template-haskell/2.2.0.0/doc /html/Language-Haskell-TH.html And perhaps use Hoogle and a text editor to search around the definitions: http://haskell.org/hoogle/?hoogle=%2BLanguage.Haskell.TH+Exp Template Haskell is quite large, in that it defines a lot of data types, but none of it is particularly complex. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Re: Is there already an abstraction for this?
Hi Larry, There is already an abstraction for this, its called transform, and it resides in the Uniplate library: http://www-users.cs.york.ac.uk/~ndm/uniplate/ I have no idea what it is, or if it exists in the algebra library! Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Evans Sent: 18 October 2008 10:48 pm To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Re: Is there already an abstraction for this? On 09/23/08 01:01, Jake Mcarthur wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The first thing I thought of was to try to apply one of the recursion schemes in the category-extras package. Here is what I managed using catamorphism. - - Jake - -- -- data Expr' a = Quotient a a | Product a a | Sum a a | Difference a a | Lit Double | Var Char type Expr = FixF Expr' instance Functor Expr' where fmap f (a `Quotient` b) = f a `Quotient` f b fmap f (a `Product` b) = f a `Product` f b fmap f (a `Sum` b) = f a `Sum` f b fmap f (a `Difference` b) = f a `Difference` f b fmap _ (Lit x) = Lit x fmap _ (Var x) = Var x identity = cata ident where ident (a `Quotient` InF (Lit 1)) = a ident (a `Product` InF (Lit 1)) = a ident (InF (Lit 1) `Product` b) = b ident (a `Sum` InF (Lit 0)) = a ident (InF (Lit 0) `Sum` b) = b ident (a `Difference` InF (Lit 0)) = a ident (Lit x) = InF $ Lit x ident (Var x) = InF $ Var x According to: cata :: Functor f = Algebra f a - FixF f - a from: http://comonad.com/reader/2008/catamorphism ident must be: Algebra f a for some Functor f; however, I don't see any declaration of ident as an Algebra f a. Could you please elaborate. I'm trying to apply this to a simple boolean simplifier shown in the attachement. As near as I can figure, maybe the f could be the ArityN in the attachment and maybe the a would be (Arity0 ConBool var). The output of the last line of attachment is: bool_eval:f+f+v0=(:+) (Op0 (OpCon BoolFalse)) (Op0 (OpVar V0)) however, what I want is a complete reduction to: (OpVar V0) How can this be done using catamorphisms? == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: GHC 6.10 confusion
Hi See: http://hackage.haskell.org/trac/ghc/ticket/2585 The solution is to grab a version of GHC 6.8 and copy its windres.exe into the GHC 6.10 bin directory. This will be fixed before release. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J. Garrett Morris Sent: 17 October 2008 4:21 pm To: GHC users Subject: GHC 6.10 confusion Hello everyone, I've been attempting to build darcs under ghc-6.10.0.20080920. Currently, I'm getting the following error: ghc failed with: D:\Programs32\GHC\ghc-6.10.0.20080920\bin/windres: CreateProcess (null): No error Does anyone recognize this? Any pointers for where I should be looking? This is on Vista 64-bit SP1. /g -- I am in here ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: [Haskell-cafe] Object-oriented programming, Haskell and existentials
Yes, hbc had existential types around 1993. I've used an encoding of existentials in O'Caml (well F#), and it works, but I find it painful. And when a very smart but non-CS person saw it his mind boggled, whereas he understood the existential version just fine. I'm a CS person, and when I saw the encoding of existentials my mind boggled. I just ended up giving up type checking entirely and using obj (the F# equivalent of Data.Dynamic) throughout. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: Repair to floating point enumerations?
Hi Malcolm, The current behaviour does sound like a bug, and the revised behaviour does sound like a fix - and one that has a sensible explanation if people trip over it. In general having floating point be a member of classes such as Eq has some obvious problems, but I realise is a necessity for practical programming. Given that we have Eq Double, then Enum Double seems no worse. If we don't alter H98 then a valid program under H98 vs H' will give different results without any warning - that seems really bad. In addition, having two instances around for one typeclass/type pair in a big library (base) which are switched with some flag seems like a nightmare for compiler writers. So I think a good solution would be to fix H98 as a typo, and include it in H'. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Malcolm Wallace Sent: 15 October 2008 10:41 am To: haskell-prime@haskell.org Cc: [EMAIL PROTECTED] Subject: Repair to floating point enumerations? Dear Haskell-Primers (and libraries). Recently, Phil Wadler has pointed out a weird anomaly in the Haskell'98 Prelude, regarding numeric enumerations for Floats/Doubles: Prelude [0, 0.3 .. 1.1] [0.0,0.3,0.6,0.89,1.2] What is odd is that the last value of the list is much larger than the specified termination value. But this is exactly as specified by the Haskell'98 Report. http://haskell.org/onlinereport/basic.html#sect6.3.4 For Float and Double, the semantics of the enumFrom family is given by the rules for Int above, except that the list terminates when the elements become greater than e3+i/2 for positive increment i, or when they become less than e3+i/2 for negative i. We have discussed this question (and related ones, such as whether Float and Double belong in the Enum class at all) several times before, and I do not wish to rehash all of those points again e.g.: http://www.cse.unsw.edu.au/~dons/haskell-1990-2000/msg07289.html http://www.haskell.org/pipermail/haskell/2001-October/008218.html http://www.haskell.org/pipermail/haskell/2002-October/010607.html Phil proposes that, although retaining the instances of Enum for Float and Double, we simplify the definitions of the numericEnumFrom family: numericEnumFromThenTo :: (Fractional a, Ord a) = a - a - a - [a] numericEnumFrom = iterate (+1) numericEnumFromThen n m = iterate (+(m-n)) n numericEnumFromTo n m = takeWhile (= m) (numericEnumFrom n) numericEnumFromThenTo n m p = takeWhile (= p) (numericEnumFromThen n m) The particular feature of note is that the odd fudge factor of (1/2 * the increment) is removed. The inexact nature of floating point numbers would therefore cause a specification like [ 0.0, 0.1 .. 0.3 ] to yield the sequence [ 0.0, 0.1, 0.2 ] that is, to omit the upper bound, because (3 * 0.1) is actually represented as 0.34, strictly greater than 0.3. Phil argues that this behaviour is more desirable: the simple fix is that the user must add a suitable epsilon to the upper bound. The key word here is *suitable*. The old definitions included completely bizarre and often highly unsuitable choices of epsilon. This proposal seems to me to improve the consistency of the enumeration syntax across both the integral and floating types. Some users may still be surprised, but the surprise will be easier to explain. I am bringing this question to the attention of all who are interested in Haskell Prime, because it seems like a sensible and well-reasoned change. Discussion on whether to adopt this proposal for H' is welcome. But as maintainer and bug-fixer of the Haskell'98 Report, I have also been asked whether we should make this change retrospectively to the Haskell'98 language (as a typo). Since it involves not merely an ordinary library function, but a Prelude function, and moreover a function that is used in the desugaring of syntax, it is less clear to me whether to alter Haskell'98. Thoughts? Regards, Malcolm ___ Libraries mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/libraries == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime
RE: [Haskell-cafe] Re: What I wish someone had told me...
Hi I didn't understand Monads until I read this: http://www.haskell.org/haskellwiki/Monads_as_Containers It took me quite a long time to get them too, but slowly over time it will sink in. Thanks Neil From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Leimbach Sent: 15 October 2008 4:16 pm To: John Lato Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Re: What I wish someone had told me... On Wed, Oct 15, 2008 at 8:08 AM, John Lato [EMAIL PROTECTED] wrote: I'd like to thank everyone who replied to my OP, and also perhaps clarify one point. I wasn't trying to be argumentative or negative about any work people have done to make Haskell approachable for OO programmers (or any other programmers, for that matter). I simply wanted to know what others thought about one item that was misleading to me in particular, and to see if others either agreed with me or had similar experiences. That being said, I know that it's a great deal of work to put together a useful tutorial, and I appreciate every one I read. Especially the monad tutorials, of which it took a half dozen before I got it. I've read a lot of the Monad tutorials, and I feel like I only get most of it to be 100% honest. The State Monad still boggles my mind a little bit. I understand what it's supposed to do and I get the idea about how it works. It's just that when I look at the implementation of = for it, I want to crawl into a corner and nibble my fingers. Ok, it's not that bad, but I'll admit I've gone cross-eyed a few times trying to keep all that state in my head about what's REALLY going on there. Perhaps if it were pulled apart step by step I'd have a better understanding. I even tried to implement it once, and failed, however, I never seem to fail to be able to *use* it if someone already implements it for me :-). Kind of like how I know how to operate a car, but I wouldn't trust driving one that I built :-) Dave == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Constraints at construction
Hi Iain, The wiki page has quite a nice article: http://www.haskell.org/haskellwiki/Smart_constructors Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Iain Barnett Sent: 09 October 2008 2:03 pm To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Constraints at construction If I were to create an object in C#, for instance, I could add code to the constructor that might limit the type further e.g. public class Car { string model; int wheels; public Car ( string model, int no_of_wheels ) { if ( no_of_wheels = 2 ) { throw new Exception( a car must have at least 3 wheels); } this.model = model; this.no_of_wheels = no_of_wheels; } } or I could specify all sorts of things, like the size of an array could only be a certain length, or whatever. Similarly, when creating a column with SQL I'd be able to specify further constraints on the column than just it's type. I don't see how to do this with Haskell and the data keyword. Is there a tutorial someone could point me to, or an explanation of this? Or is it that I have to wrap the creation in an accessor function that checks the inputs first? type Model = String type Wheels = Int data Car = Car Model Wheels car_maker model wheels = if wheels = 2 then error ... else Car model wheels ? Most of my programming career (if you can call it that:) has been primarily with C# and SQL, and perhaps this heady mixture of OOP and hacked-functional is confusing me! Iain ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell] Catching error / making library functions monadic (in failure)
Hi Philip, You might want to take a look at the Safe library, which does pretty close to what you request. http://www-users.cs.york.ac.uk/~ndm/safe/ (or cabal install safe) I would happily accept a patch adding *Fail variants that failed in some appropriate Monad if that is what you want. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philip K.F. Hölzenspies Sent: 08 October 2008 3:38 pm To: haskell@haskell.org Subject: [Haskell] Catching error / making library functions monadic (in failure) Dear Hask'lers, I'm working on a graph generator that involves a lot of random selection out of a list of vertices. Basically, there are functions that look a little like this: select vs = randomRM (0,length vs - 1) = return . (vs !!) where randomRM is a lot like Random.randomRIO, except that it is not in the IO monad, but rather in any monad, i.e. class Monad m = RandomM m where randomM :: m a randomRM :: (a,a) - m a instance RandomM IO where randomM = randomIO randomRM = randomRIO The problem is, obviously, that when the list of vertices (vs) is empty, select vs will result in an error. The Prelude defines (!!) as: xs !! n | n 0 = error Prelude.!!: negative index [] !! _ = error Prelude.!!: index too large (x:_) !! 0 = x (_:xs) !! n = xs !! (n-1) The function 'error' is implemented (at least in GHC) using Control.Exception.throw. Unfortunately, 'catch' does not seem to work. From ghci: Prelude catch (return $ [] !! 0) (const $ putStrLn foo return 42) *** Exception: Prelude.(!!): index too large Is there any way to catch errors in functions in libraries (like the Prelude)? This is made even more necessary by the fact that the default implementation for 'fail' in a monad is 'error'. I would already be happy if I could make all applications of error change into applications of fail, as defined in my monad. Preferably, though, I would not even need a failure mechanism in my own monad, but rather have an ErrorMonad (or something similar) and just have class Monad m = ErrorMonad error m | m - error where onError :: m a - (error - a) - a For now, I simply reimplement the functions I need that give errors. Regards, Philip ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
RE: [Haskell-cafe] Darcs / Git
Yes, I've used SSH key. Didn't think it would be different with a password. It really is! :-) Thanks Neil On 7 Oct 2008, at 20:19, Mitchell, Neil wrote: I use darcs on Windows every day and it works well. The only problem is that it is not very usable if you access your repository via SSH and the authentication is via password. Why not? It worked fine for me. It's never worked for me, I always get a frozen darcs trying to read a password, but not from my console. If you connect with an SSH key its more secure and less typing - it's a better way to go. Thanks Neil = = = = = = = = == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html = = = = = = = = == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Hoogle? [Stacking monads]
Actually, I was thinking more along the lines of Data.Traversable.sequence, which has sequence :: (Traversable t, Monad m) = t (m a) - m (t a) Are you expecting c1 (:: * - * - *) to unify with [] (:: * - *)? That seems kind incorrect at the very last. Additionally, those types don't look all that close. Well, as I said, replacing one term with another transforms one signature into the other. I guess you can't curry type constructors as easily as functions - or at least, Hoogle currently doesn't like it. Yes, currying of type constructors is much less common, and entirely unsupported by Hoogle. Is there a general need for Hoogle to deal with curried type constructors? I'd not really considered it significantly. But, let's briefly consider unification (and why Hoogle doesn't used it). Consider the search: Eq a = [(a,b)] - a - b What the user wants is lookup, which sadly doesn't unify. However, undefined unifies perfectly. I see... I notice that x - y doesn't unify with y - x in any way, shape or form, but Hoogle has absolutely no problem with that. Hoogle has a problem with it, but not a severe problem. If you use the command line version you can type --verbose to get a list of the penalty points Hoogle has applied to a match. What *does* Hoogle actually use for matching? Just a set of huristics and a metric for how similar two signatures are so it can order by approximate similarity? Or is it something more scientific than that? It's more scientific than that, see http://www.wellquite.org/anglohaskell2008/ There will be a paper on Hoogle type matching at some point! Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Darcs / Git
I use darcs on Windows every day and it works well. The only problem is that it is not very usable if you access your repository via SSH and the authentication is via password. Why not? It worked fine for me. It's never worked for me, I always get a frozen darcs trying to read a password, but not from my console. If you connect with an SSH key its more secure and less typing - it's a better way to go. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Hoogle? [Stacking monads]
Hi Try doing a Hoogle search for c1 (c2 x) - c2 (c1 x). Hoogle correctly states that Data.Traversable.sequence will do it for you. Now try doing c1 k (c2 x) - c2 (c1 k x). The 'sequence' function will also do this, but now Hoogle returns 0 results. This is puzzling, since AFAIK, the above two type signatures are equvilent in some sense. (Specifically, replace every type X with type Y and you get from one to the other.) To me, this looks like a Hoogle bug. (It goes without saying that Hoogle also failed to find anything for the more specific type signature I was searching for, despite the fact that 'sequence' unifies with it.) Hoogle is not a unification engine - since that is very rarely what people want out of a type search engine. What it is is an approximate matcher. Let's compare the two types: Your search :: c1 k (c2 x) - c2 (c1 k x) sequence :: Monad m = [m a] - m [a] Are you expecting c1 (:: * - * - *) to unify with [] (:: * - *)? That seems kind incorrect at the very last. Additionally, those types don't look all that close. But, let's briefly consider unification (and why Hoogle doesn't used it). Consider the search: Eq a = [(a,b)] - a - b What the user wants is lookup, which sadly doesn't unify. However, undefined unifies perfectly. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Hmm, what license to use?
Hi You mean shared libraries without the opportunity to inline library code? This would result in a huge performance loss, I think. Usually _mild_ performance loss, in exchange for major code-size savings, I would think. C obviously has worked quite fine under exactly this restraint (though C implementations obviously aren't built to take as great advantage of inlining library code as Haskell may be). I think that the performance loss is much higher in the case of Haskell because of Lazy Evaluation, massive use of higher order functions and possibly more. Example 1: foo x | test `isPrefixOf` xs = ... | otherwise = ... If you have cross-module inlining, you get the rather obvious if like construct. If you don't, you have to evaluate otherwise and test its value. Example 2: (a :: Int) + b If you have cross-module specialisation you get a primitive integer arithmetic instruction (possibly with a bit of unboxing, although often not). If you don't, you get a dictionary lookup, followed by a higher order application. One reason cross-module inlining is essential is that many Haskell functions don't do very much, think of (+), (||), (), not, otherwise etc. In C these would be built-in's, so are always available to the optimiser (and usually just one instruction), in Haskell you need to get them from the Prelude. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Announcing OneTuple-0.1.0
Quoting Lennart Augustsson [EMAIL PROTECTED]: But I called it One. I did a similar one for Yhc, and I think I called it Box. My guess was that boxing/unboxing wasn't an overloaded enough term :-) Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] One liner?
Hi You can translate this step by step. main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc Translating out the do notation (http://www.haskell.org/haskellwiki/Keywords#do): main = getDirectoryContents = \dc - mapM_ putStrLn dc Then we can chop out the dc argument, as its \x - x, and can be removed (eta reduction): main = getDirectoryContents = mapM_ putStrLn And finally we just remove the newline: main = getDirectoryContents = mapM_ putStrLn Alternatively, we can flip the = for = and write: main = mapM_ putStrLn = getDirectoryContents This is now one line, and mirrors how you would write the function if it was pure using function composition. Thanks Neil This material is sales and trading commentary and does not constitute investment research. Please follow the attached hyperlink to an important disclaimer www.credit-suisse.com/emea/legal outbind://31/www.credit-suisse.com/emea/legal From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Keir Sent: 02 October 2008 4:20 pm To: haskell-cafe@haskell.org Subject: [Haskell-cafe] One liner? Hi all, There's a common little situation I keep bumping up against. I don't understand where I'm going wrong, so I've made a little example. It's to do with binding a result to a variable name using -. This code works fine: -- module Main where import System.Directory (getDirectoryContents) main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc -- But if I try to avoid the use of the bind to dc, I fail: -- mapM_ putStrLn (getDirectoryContents ./foo/) -- I've tried using map instead of mapM_, and inserted returns here and there, but no luck. Can anyone tell me where and why I'm going wrong? The error message is below. Cheers, Paul Couldn't match expected type `[String]' against inferred type `IO [FilePath]' In the second argument of `mapM_', namely `(getDirectoryContents ./foo/)' In the expression: mapM_ putStrLn (getDirectoryContents ./foo/) In the definition of `main': main = mapM_ putStrLn (getDirectoryContents ./foo/) == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] One liner?
main = do dc - getDirectoryContents ./foo/ mapM_ putStrLn dc Translating out the do notation (http://www.haskell.org/haskellwiki/Keywords#do): main = getDirectoryContents = \dc - mapM_ putStrLn dc Woops, I lost ./foo/ here, but it should be fairly easy to insert through the remaining translations. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Hackage Build Failures
The error comes from using QuickCheck 2, which happens to also use the operator (). I can see two ways to solve the problem: (1) Add 2 after QuickCheck in the Wired.cabal file. (2) Add hiding (()) after import Test.QuickCheck in Data/Hardware/Internal.hs Emil, my suggestion is: Please use alternative (2), at least if there are no further problems with quickcheck 2! Otherwise, depending on quickcheck 2 just introduces unnecessary package incompatibilities. Note that if you import hiding something that doesn't existing you'll have a problem. Therefore this fix will require = 2 for quickcheck, and introduce incompatibilities either way. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Haskell versus F#, OCaml, et. al. ...
Hi, For libraries F# is probably superior to all, as it has libraries for virtually everything, and can interoperate seamlessly with COM and .NET. I doubt there will be any library functionality that can't be found or bought. Thanks Neil -- Hello, Frank mode on ... ;^) In terms of functionality, where is Haskell superior vs inferior to ML, Caml, OCaml, F#, Erlang, etc.? E.g. in terms of library functionality? Regards, Vasili == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Total Functional Programming in Haskell
Hi 1) Total Functional Programming is great. But a combination of Approve and Catch gives you termination and pattern-match safety checks for Haskell, giving you all the advantages of TFP without forcing you to write total patterns etc. Plus you can use all the Haskell tools. In reality, neither of those tools is probably ready for prime time - but neither is that far off. In the meantime something like Agda might give you some of what you want. 2) We already have a IO outer layer (monad), and the checkers above collapse the first 2 layers. Perhaps a monadic or annotated middle layer would be handy for bits that the checkers can't validate. The idea of |- vs - seems like encoding lots in the type system, which seems to be going overboard. It might be a tool of last resort, but you'd much rather eliminate the partial bits entirely. As for optimisation, remember that closed terms are strongly normalising, but that the compiler will almost certainly have to work on open terms, which aren't. Things like partial evaluation might be easier to do, but there is still technology from the 1970's (supercompilation) that we've only just begun to apply to Haskell - so I don't think termination of closed terms is pressing optimisation bottleneck. Thanks Neil From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Dagit Sent: 30 September 2008 4:03 am To: haskell mailing list Subject: [Haskell-cafe] Total Functional Programming in Haskell Hello, I recently had someone point me to this thread on LtU: http://lambda-the-ultimate.org/node/2003 The main paper in the article is this one: http://www.jucs.org/jucs_10_7/total_functional_programming/jucs_10_07_07 51_0768_turner.pdf It leaves me with several questions: 1) Are there are existing Haskell-ish implementations of the total functional paradigm? 2) Could we restructure Haskell so that it comes in 3 layers, total functional core, lazy pure partial functional middle, and IO outer layer? The idea with #2 is that similar to how we use the type system to separate the purely functional from monadic, and in particular IO actions, can we make the inner most part of Haskell total? Furthermore, could we do this in a way that makes it easy to intermingle the three layers the way we can mingle pure Haskell with IO actions? Maybe instead of using (-) as the function constructor for total functions we use a different symbol, say (|-), and the compiler knows to use the more specialized semantics on those definitions. I'm not sure how make this work for values that are total functional versus values that are just pure (partial) functional. I'm also interested in hearing about the optimizations that would be possible when all your expressions are strongly normalizing. Jason == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Haskell versus F#, OCaml, et. al. ...
For libraries F# is probably superior to all, as it has libraries for virtually everything, and can interoperate seamlessly with COM and .NET. I doubt there will be any library functionality that can't be found or bought. Libraries for monad transformers I found lots of stuff for Monads: http://blogs.msdn.com/wesdyer/archive/2008/01/11/the-marvels-of-monads.a spx http://blogs.msdn.com/lukeh/archive/2007/08/19/monadic-parser-combinator s-using-c-3-0.aspx No Monad transformers yet, but I have seen GADT's in C# (which means they probably work in F# too). or comonadic streams? ;) Google doesn't even know what this is! http://www.google.co.uk/search?hl=enq=%22comonadic%20streams%22meta= (of course, it will in a day or so, when it sees this message) Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Total Functional Programming in Haskell
Hi for little more than personal taste). In particular, I'd like to see a reasoning framework for partial functions, so you could state and prove a property like: length [1..] = _|_ In a compiler, with: default(Int) main = print $ length [1..] Results in 2147483647 I don't think dependent types are the answer - or at least I don't think people have asked the questions in standard Haskell enough. We still don't even have an equational reasoning assistant publically available and widely used. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
newSession gone from GHC API
Hi I just noticed that newSession has been removed from the GHC API. Unfortunately, this breaks nearly all examples on the web: http://www.haskell.org/haskellwiki/GHC/As_a_library http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/API Could someone fix those up, to show the new style of interaction? Also are the breaking changes to newSession in GHC 6.10, or only in GHC Head? Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: [Haskell-cafe] TH error
Hi Tim, You seem to be duplicating the functionality of Data.Derive to some extent: http://www.cs.york.ac.uk/~ndm/derive/ You might find it easier to use that tool, and if it doesn't meet your needs send in a patch :-) Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Newsham Sent: 27 September 2008 3:34 am To: haskell-cafe@haskell.org Subject: [Haskell-cafe] TH error I'm goofing with TH and I have my program mostly done: http://hpaste.org/10713 If I have the $(deriveBinary ''MyData) line commented out it prints out what looks to me like correct code. I can even paste it into a program and it compiles. However, when the line isn't commented out I get an error I don't understand: test.hs:1:0: Illegal data constructor name: `x' When splicing generated code into the program There are two places in my code I use x in splices that could be causing the problem: g - [| getWord8 = \x - $(caseE [| x |] gcases') |] and put x = $(caseE [| x |] (map return ps)) |] but I don't understand why these might be causing errors (if they are indeed the cause). Using -ddump-splices doesn't help since it seems to hit the error before dumping splices. What's going on here? Tim Newsham http://www.thenewsh.com/~newsham/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Re: Haddock + Hoogle == Javadoc on steroids
Hi Simon, http://joyful.com/repos/darcs-sm/api-doc is a mashup of haddock, hoogle and hscolour (and darcsweb, darcs-graph - see http://joyful.com/repos). I can see the Haddock information, but not the Hoogle/HsColour mashup. I'm using Firefox 3. Am I missing something? How do you get started with a Hoogle query? had time to work on this, currently I hard-code the target in hoogle and munge the haddock output slightly (see recent patch in darcs-unstable). I believe you emailed me privately with a question about pointing at haddock documentation from Hoogle. I'm currently a bit out of sync with emails as I've just moved house, don't yet have internet, and can't check my gmail account from work. The answer, from what I can remember of the question, is: How do I get Hoogle to point at a particular documentation repo? The answer is to add a line similar to: @haddock http://hackage.haskell.org/packages/archive/Cabal/latest/doc/html/ to the Text file you get out of haddock --hoogle. You can also add an @hackage url, which is treated as the home page of the package. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Code.haskell.org down
Hi, For me, it seems that code.haskell.org is down. Is this the case for other people as well? It seems code.haskell.org regularly looses connectivity for me :-( Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] Code.haskell.org down
Hi http://downforeveryoneorjustme.com/code.haskell.org sez: It's just you. code.haskell.org is up. Now its up for me as well. It's a little annoying that code.haskell.org seems so flakey. (Seriously though, the above site is a great tool for such circumstances.) That is a great site, I'll bookmark it. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: making Happy-1.17
Hi Serge, It reports Configuring happy-1.17... Setup.lhs: At least the following dependencies are missing: mtl =1.0 First make mtl, which is avaiable here: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/mtl Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Adding (some) libraries to a GHC tree
Hi The paragraph in the new page is better than the old one, but it makes sense to have the information in only one place. When looking for the information getting the sources didn't occur to me as a description of how to get any extra libraries (although on reflection, I'm surprised I didn't try it). Thanks Neil -Original Message- From: Simon Peyton-Jones [mailto:[EMAIL PROTECTED] Sent: 17 September 2008 1:40 pm To: Mitchell, Neil; Jost Berthold Cc: glasgow-haskell-users@haskell.org Subject: RE: Adding (some) libraries to a GHC tree good stuff -- but with a big overlap with the Getting more packages section in http://hackage.haskell.org/trac/ghc/wiki/Building/GettingTheSo urces. Do you agree? Would it be possible to merge your new paragraphs into the existing page? If the existing page is too big and hard to navigate we could break it up. S | -Original Message- | From: [EMAIL PROTECTED] | [mailto:glasgow-haskell-users- [EMAIL PROTECTED] On Behalf Of | Mitchell, Neil | Sent: 17 September 2008 10:50 | To: Jost Berthold | Cc: glasgow-haskell-users@haskell.org | Subject: RE: Adding (some) libraries to a GHC tree | | Hi Jost, | | Many thanks, that's perfect. | | I moved the page to | http://hackage.haskell.org/trac/ghc/wiki/Building/AddingLibs , and | referenced it from http://hackage.haskell.org/trac/ghc/wiki/Building | | Thanks | | Neil | | -Original Message- | From: Jost Berthold [mailto:[EMAIL PROTECTED] | Sent: 17 September 2008 10:36 am | To: Mitchell, Neil | Cc: glasgow-haskell-users@haskell.org | Subject: Adding (some) libraries to a GHC tree | | Hi Neil, | | You can manually add any package which is listed in | http://hackage.haskell.org/trac/ghc/wiki/DarcsRepositories | by getting it (with darcs), directly into the /libraries subdirectory. | When you later use darcs-all, the added library will be included | when pulling new changes etc. | | I have added a wiki page to explain this: | http://hackage.haskell.org/trac/ghc/wiki/AddingLibsToBuild | (feel free to remove it and add the material to a more convenient | place) | | HTH | Jost | | | | | == | Please access the attached hyperlink for an important | electronic communications disclaimer: | | http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html | == | | | ___ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Adding (some) libraries to a GHC tree
Hi Jost, It looks great now. When I saw the contributed documentation I did wonder if that was the GHC sanctioned way of adding information to the wiki - which defeats the purpose of a wiki somewhat. Perhaps all the Contributed documentation titles could be changed to Miscellaneous documentation, and then merged in to the main stuff over time. Thanks Neil -Original Message- From: Jost Berthold [mailto:[EMAIL PROTECTED] Sent: 17 September 2008 3:23 pm To: Simon Peyton-Jones Cc: Mitchell, Neil; glasgow-haskell-users@haskell.org Subject: RE: Adding (some) libraries to a GHC tree Simon Peyton-Jones wrote: great. Can you just do the merge? You are hereby appointed an accredited wiki maintainer! Thank you :) I edited GettingTheSources as we said, and removed the links from the /Building page. Neil, if you think the extra links should be kept, sorry and please revert. Jost == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: [Haskell-cafe] readFile and closing a file
Hi Henning, I tend to use openFile, hGetContents, hClose - your initial readFile like call should be openFile/hGetContents, which gives you a lazy stream, and on a parse error call hClose. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henning Thielemann Sent: 17 September 2008 12:31 pm To: Haskell Cafe Subject: [Haskell-cafe] readFile and closing a file Say I acquire a text by readFile, feed it to a lazy parser and the parser stops reading because of a parse error. After the parser error I won't fetch more characters from the text file, but readFile does not get to know that and cannot close the file. Actually, when encountering a parser error I could read the remaining characters from the file in order to let readFile close the file eventually, but this sounds rather inefficient. So, what is the right way to go, or do I have to stay away from readFile (and maybe unsafeInterleaveIO at all)? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RE: [Haskell-cafe] about openTempFile
But since GHC does not implement such a function, I was curious to know why it don't even implement a function that make sure the temporary file is removed. Because it is two lines to write, so no one has yet proposed it for the base library. Map is 2 lines, but we have that as a library (1 line in Hugs). Otherwise is a whole one lexeme long, but we still provide a library function. This one is tricky and has lots of edge cases! If its useful, it should be in the libraries. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Building GHC with time package
Hi, I want to build GHC HEAD with the time package. I figured out how to do it by editing packages and removing the word extralibs, but that doesn't seem to be the correct way. I suspected I might be able to get time included by giving some incantation to ./darcs-all, but I couldn't figure out what - commands such as help and --help to darcs all were little use. What is the correct way to add a library into the GHC build? If someone tells me I'll add it to the wiki somewhere. I tried looking here: http://hackage.haskell.org/trac/ghc/wiki/Building Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: GADT problems
Ah -- you used an *existential* there! Yes, existentially-bound type variables are rigid. They stand for themselves, as it were. How should this be clarified? I'd leave it. I wanted a simple set of rules stating _if_ you provide the following type signatures your code _will_ compile, which is what you currently provide, albeit I interpreted 'result' slightly differently. If people want to learn where these type signatures can be omitted (because a type is already rigid) people can follow the papers, or learn by trial and error. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Windows build failure
Hi Claus, For reference, I'm using cygwin bash+mingw gcc on Windows XP, following your instructions as closely as possible - but with the latest version of cygwin and mingw. The biggest niggle for me currently is the lack of the GHC API, which is built in stage2, but not transferred across to the bindist. However, there seem to be lots of little things that will require fixing before the Windows version is ready for release. If it was just a mingw issue, you could simply go back to an old mingw (mine has gcc 3.4.2). From what I can tell (and I'm just a user) there are interactions with Vista and cygwin. My new home computer will almost certainly be Vista, so I guess I'm in for a world of fun then :-) Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Windows build failure
* The ghc API package hasn't been installed. ghc-pkg list gives: | Do you have this patch?: Probably not, I've just pulled and am rebuilding. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Windows build failure
Hi Ian, Fresh pull, and I get in bind-dist: ../../utils/mkdirhier/mkdirhier c:/ghc-build/ghc/ghc-6.9.20080905/share/man mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share/man ../../utils/mkdirhier/mkdirhier c:/ghc-build/ghc/ghc-6.9.20080905/share/man/man1 mkdir c:/ghc-build/ghc/ghc-6.9.20080905/share/man/man1 /usr/bin/install -c -m 644ghc.1 c:/ghc-build/ghc/ghc-6.9.20080905/share/man/ man1 Finished making install-docs in man: 0 == make install-docs - --no-print-directory -r; in /cygdrive/c/ghc-build/ghc/docs/docbook-cheat-sheet make[3]: Nothing to be done for `install-docs'. Finished making install-docs in docbook-cheat-sheet: 0 == make install-docs - --no-print-directory -r; in /cygdrive/c/ghc-build/ghc/docs/users_guide make[3]: Nothing to be done for `install-docs'. Finished making install-docs in users_guide: 0 == make install-docs - --no-print-directory -r; in /cygdrive/c/ghc-build/ghc/docs/ext-core make[3]: *** No rule to make target `install-docs'. Stop. Failed making install-docs in ext-core: 1 make[2]: *** [install-docs] Error 1 make[1]: *** [install-docs] Error 1 make[1]: Leaving directory `/cygdrive/c/ghc-build/ghc' make: *** [binary-dist] Error 2 Ext-core install-docs doesn't work? Thanks Neil -Original Message- From: Ian Lynagh [mailto:[EMAIL PROTECTED] Sent: 10 September 2008 1:14 pm To: Mitchell, Neil Cc: glasgow-haskell-users@haskell.org Subject: Re: Windows build failure On Wed, Sep 10, 2008 at 12:26:00PM +0100, Mitchell, Neil wrote: * The ghc API package hasn't been installed. ghc-pkg list gives: | Do you have this patch?: Probably not, I've just pulled and am rebuilding. OK, I think your haddock problems are also fixed in the HEAD, by: [Fix in-tree haddock on Windows Ian Lynagh [EMAIL PROTECTED]**20080829000742] { so if you ./darcs-all pull then that should work too. Thanks Ian == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
RE: Windows build
Hi Claus, If I understand the implications correctly, one would need a three point change to adapt properly: - sign the setup.ini file with a key, in place - put up a public key to check against, somewhere else - point setup.exe to the location of the public key Given that all we want are the dependencies (the package is empty), this is starting to look ridiculous (one has to put in more administrative information than one saves from not having to specify the dependencies by hand..). However, the dependency package is very useful, so if its not too much work, it would be useful. Please remember to update the log on the wiki page when you succeed - the value of this log comes from being applied from scratch (when just updating, it is easy to miss something). I am keeping an up to date list of what I do and what works, so will combine it in once I have a working build. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
(no subject)
Hi Claus, I was reading your instructions on the GHC wiki page, http://hackage.haskell.org/trac/ghc/wiki/Building/Windows, and they are wonderful - exactly what I wanted. However, they don't work. When downloading Cygwin you are told to add haskell.org/ghc/cygwin as a path so it can pick up the setup.ini file. However, in the latest version of Cygwin it obvious wants signatures for all the .ini files: --- Cygwin Setup --- Unable to get http://www.haskell.org/ghc/cygwin/setup.ini.sig from http://www.haskell.org/ghc/cygwin --- OK --- Could someone please add the appropriate signature file? Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Windows snapshot binaries
Hi, Looking at: http://www.haskell.org/ghc/dist/current/dist/ The latest Windows binary appears to be the 22nd of June, and thus is before things such as the Control.Exception changes, and will not work with the current version of Haddock. Is it possible to get an updated binary? From what I remember, these snapshots are also used for the Windows binary release, so will have to be fixed before 6.10 can be released. Thanks Neil == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
GADT problems
-> Re: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Philippa Cowderoy Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Philippa Cowderoy RE: GADT problems Mitchell, Neil Re: GADT problems Jason Dagit Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Philippa Cowderoy RE: GADT problems Mitchell, Neil Re: GADT problems Jason Dagit Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Philippa Cowderoy RE: GADT problems Mitchell, Neil Re: GADT problems Jason Dagit Reply via email to
GADT problems
-> RE: GADT problems glasgow-haskell-users -- Thread -- -- Date -- <!-- google_ad_client = "pub-7266757337600734"; google_alternate_ad_url = "http://www.mail-archive.com/blank.png"; google_ad_width = 160; google_ad_height = 600; google_ad_format = "160x600_as"; google_ad_channel = "8427791634"; google_color_border = "FF"; google_color_bg = "FF"; google_color_link = "006792"; google_color_url = "006792"; google_color_text = "00"; //--> GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones Re: GADT problems Jason Dagit RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Mitchell, Neil RE: GADT problems Simon Peyton-Jones RE: GADT problems Philippa Cowderoy RE: GADT problems Mitchell, Neil Re: GADT problems Jason Dagit Reply via email to