Re: [Haskell-cafe] DLL on Windows

2010-02-16 Thread Neil Mitchell
Hi Serguey, I notice you are using GHC 6.10.3, I suggest you try 6.10.4 which I know does work. I rewrote that section of the manual recently. I haven't had time to merge it back in, but it might give you more help: http://neilmitchell.blogspot.com/2009/11/haskell-dlls-on-windows.html Thanks, N

Re: [Haskell-cafe] What is the meaning of tilde ("~") symbol

2010-02-16 Thread Neil Mitchell
Hi > The symbols that are not specified in a library can be found here: >  http://www.haskell.org/haskellwiki/Keywords > Hoogle used to show links to this page, when a keyword was searched, but not > anymore. And that's a bug: http://code.google.com/p/ndmitchell/issues/detail?id=280 (that I only

Re: [Haskell-cafe] DLL on Windows

2010-02-16 Thread Neil Mitchell
gt; > If I can, I'll use 6.10.3 for gtk2hs code and 6.12 for all new stuff. > > 2010/2/16 Neil Mitchell : >> Hi Serguey, >> >> I notice you are using GHC 6.10.3, I suggest you try 6.10.4 which I >> know does work. >> >> I rewrote that section of the ma

Re: [Haskell-cafe] DLL on Windows

2010-02-16 Thread Neil Mitchell
> > How do you use C# for GUI development? Do you use hs-dotnet? > > 2010/2/16 Neil Mitchell : >> Hi Serguey, >> >> A GHC 6.10.4 version of Gtk2hs: >> >> http://www.mail-archive.com/gtk2hs-de...@lists.sourceforge.net/msg00340.html >> >> I used t

Re: [Haskell-cafe] What is the meaning of tilde ("~") symbol

2010-02-16 Thread Neil Mitchell
Hi Patrick, >> The symbols that are not specified in a library can be found here: >>  http://www.haskell.org/haskellwiki/Keywords > > I noticed that \ is not in that list, should it be? Yes! Add it. If it would help a beginner understand what something means, it should be on that list. Thanks, N

Re: [Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-06 Thread Neil Mitchell
That and all Cabal 0.8 binaries on Windows suffer from zlib corrupted stream issues. I've got cabal-install binary, but it's not worth distributing :-( There is a cabal ticket for this. Thanks, Neil On Fri, Mar 5, 2010 at 11:27 PM, Ivan Lazar Miljenovic wrote: > Andrew Coppin writes: >> Is the

Re: [Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-06 Thread Neil Mitchell
> Have you tried compiling cabal-install with GHC 6.12.1? I got these stream > errors after I compiled it with 6.10.4, but with 6.12.1 it's working > flawless. Woohoo, your tip works! Thanks a lot. Neil > > 2010/3/6 Neil Mitchell >> >> That and all Cabal 0.8

Re: [Haskell-cafe] Haskell platform for GHC 6.12.1?

2010-03-07 Thread Neil Mitchell
org/cabal/download.html ? > A while ago I gave up on trying to get GHC 6.12.1 working, for I lost the > battle building cabal on my windows machine > It would help A LOT when cabal.exe could be downloaded somewhere... > > Thanks > > Han Joosten > > > Neil Mitchell wrote: >&g

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

2010-03-23 Thread Neil Mitchell
Hi Stephen, It actually sounds like your representation has structure, but you dislike structure because it's hard to work with. The solution is a generics library, and I recommend Uniplate: http://community.haskell.org/~ndm/uniplate Imagine you have a ridiculously complex AST, with beam groups u

Re: [Haskell-cafe] installing Network on windows

2010-03-23 Thread Neil Mitchell
Hi, I managed this with the following sequence of commands: http://www.haskell.org/pipermail/libraries/2010-February/013038.html Thanks, Neil On Wed, Mar 17, 2010 at 9:44 PM, Niklas Larsson wrote: > Hi! > > It needs some shell, if you install MSYS from mingw and do the cabal install > from ther

Re: [Haskell-cafe] GHC vs GCC vs JHC

2010-03-27 Thread Neil Mitchell
Hi John, Any chance of seeing the benchmark? You're not the only one with an optimising compiler tucked away somewhere :-) I have one "benchmark" where I outperform GHC by 21 times, although saying it's artificial is a bit of an understatement... Thanks, Neil On Fri, Mar 26, 2010 at 6:27 PM, Jo

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-18 Thread Neil Mitchell
Hi, I thought this thread suggested that a cabal install wx would now work? I just tried it and got: ... generated 2439 constant definitions ok. setup.exe: wx-config: does not exist cabal: Error: some packages failed to install: wx-0.12.1.4 depends on wxcore-0.12.1.4 which failed to install. wxco

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-20 Thread Neil Mitchell
Hi, Have you seen the derive package? It also generates QuickCheck instances in virtually the same way - plus it can generate source code and do lots of other types of instances. http://community.haskell.org/~ndm/derive/ Thanks, Neil 2010/4/20 Bas van Dijk : > 2010/4/19 Jonas Almström Duregård

Re: GUI (was: Re: [Haskell-cafe] DLL on Windows)

2010-04-20 Thread Neil Mitchell
:-( - it seems that cabal install wx isn't how you install it on Windows, not by a long shot. I'm currently a Gtk2hs user. If wx got to the point where cabal install wx either installed wx, including all it's non-Haskell dependencies, or printed out a message "you're a windows user who hasn't inst

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-21 Thread Neil Mitchell
Hi Jonas, > As far as i can tell, derive only works for regular and linear > recursive types and Regular uses frequencies to regulate size. (Also > Regular doesn't seem to work for QuickCheck-2). Derive will generate instances for all types, but uses a fairly standard formulation (pick between ea

Re: [Haskell-cafe] Broken ghc documentation links

2010-04-28 Thread Neil Mitchell
Hi, I have recently updated Hoogle so it points at specific documentation. If anyone finds any further bugs, please let me know. I'm hoping to go through Hoogle and revise much of it in the near future, and intend to put things in place to stop this happening again (and keep it up to date). Than

Re: [Haskell-cafe] Haskell XML Parsers

2010-05-05 Thread Neil Mitchell
Hi, You might want to take a look at TagSoup (http://community.haskell.org/~ndm/tagsoup) - it parses XML/HTML lazily returning a stream of tags. It doesn't do nesting, but it does have good memory usage. Thanks, Neil On Fri, Apr 30, 2010 at 11:35 AM, R Senington wrote: > Dear all, > > I have be

Re: [Haskell-cafe] {-# LANGUAGE DeriveApplicative #-} ?

2010-05-07 Thread Neil Mitchell
Hi, If you think you can write an algorithm for deriving Applicative, I'd welcome you to try adding it to Derive: http://community.haskell.org/~ndm/derive The Functor/Foldable/Traversable derivations all started out in Derive, got tested/implemented/refined there, then moved to GHC later. I think

Re: [Haskell-cafe] Would it be evil to add "deriving Typeable" to newtype Q?

2010-05-07 Thread Neil Mitchell
Hi Leonel, You might want to try Derive (http://community.haskell.org/~ndm/derive) if DrIFT doesn't work for you. They do roughly the same jobs, but Derive has more output formats (it can be spliced in as Template Haskell, generate #include files, output text etc) more derivations (but not quite o

Re: [Haskell-cafe] TagSoup 0.9

2010-05-19 Thread Neil Mitchell
Hi Ralph, > I was using TagSoup 0.8 with great success. On upgrading to 0.9 I have this > error: > > TQ\TagSoup\TagSoupExtensions.lhs:29:17: >`Tag' is not applied to enough type arguments >Expected kind `*', but `Tag' has kind `* -> *' >In the type synonym declaration for `Bundle' > F

Re: [Haskell-cafe] No copy XML parser (rough idea only)

2010-05-20 Thread Neil Mitchell
Hi Joachim, I have been playing around with this idea myself in TagSoup (http://community.haskell.org/~ndm/tagsoup). The largest conceptual problem I came across was that TagSoup decodes entities (i.e. > becomes >). However, I think that's a minor issue, and entity resolution can be turned off in

Re: [Haskell-cafe] TagSoup 0.9

2010-05-25 Thread Neil Mitchell
\255\254<\NUL?\NULx\NULm\NULl\NUL > \NULv\NULe\NULr\NULs\NULi\NULo\NULn\NUL=\NUL\"\NUL1\NUL.\NUL0\NUL\"\NUL > \NULe\NULn\NULc\NULo\NULd\NULi\NULn\NULg\NUL=\NUL\"\NULi\NULs\NULo\NUL-\NUL8\NUL8\NUL5\NUL9\NUL-\NUL1\NUL\"\NUL > > > > etc etc > > > > I

Re: Is 78 characters still a good option? Was: [Haskell-cafe] breaking too long lines

2009-04-21 Thread Neil Mitchell
Hi > I believe it is a good practice too keep each line short and > easy to read.  The following is taken from python style > guide. > >  Maximum Line Length > >    Limit all lines to a maximum of 79 characters. > >    There are still many devices around that are limited to 80 character >    lines

Re: [Haskell-cafe] Getting the x out

2009-04-21 Thread Neil Mitchell
Hi It's not too hard. You wanted a function that converted Maybe a -> a, you just Hoogle for it: http://haskell.org/hoogle/?hoogle=Maybe+a+->+a Thanks Neil On Wed, Apr 22, 2009 at 2:07 AM, michael rice wrote: > Got it! I figured there must be some way to unpack it. > > My goodness, there are

Re: [Haskell-cafe] can I query if package is in Hackage?

2009-04-24 Thread Neil Mitchell
Hi >   Hoogle allows me to query about Haskell functionality. But is there a > mechanism for querying about a package, e.g. Swish? Yes: http://haskell.org/hoogle/?hoogle=hoogle+%2Bhackage http://haskell.org/hoogle/?hoogle=swish+%2Bhackage Answer, swish is not on hackage, but hoogle is. Th

Re: [Haskell-cafe] chr/ord?

2009-05-01 Thread Neil Mitchell
Hi > But I get this when I try to use it: > > sheep.hs:30:22: Not in scope: `mplus' > [mich...@localhost ~]$ You need to import Control.Monad. You can find answers to these sorts of questions with Hoogle: http://haskell.org/hoogle/?hoogle=mplus Thanks Neil __

Re: [Haskell-cafe] Research in functional programming

2009-05-04 Thread Neil Mitchell
Hi http://www.haskell.org/haskell-symposium/2009/ And you've got til Friday! Thanks, Neil On Sun, May 3, 2009 at 10:13 PM, Louis Wasserman wrote: > Where might I find or submit a paper on functional data structures? > Examples I've found so far include ICFP and the JFP, but Google hasn't found

Re: [Haskell-cafe] Generating Haskell with associated types (and kind annotations)

2009-05-08 Thread Neil Mitchell
Hi Dan, > I was wondering whether anyone had any suggestions on a good way to > generate repetitive code with associated types and kind annotations. haskell-src-exts is the answer: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts >From the project description: "Haskel

Re: [Haskell-cafe] Why is Bool no instance of Num and Bits?

2009-05-08 Thread Neil Mitchell
t. Is that a GHC thing? Is it strictly necessary? Seems > like it could be done in the Num instance for Integers, Ints, etc. > > On Fri, May 8, 2009 at 11:51 AM, Neil Mitchell wrote: >> >> > Err, I'm not seeing the danger of this >> > (+) :: forall a. (N

Re: [Haskell-cafe] Why is Bool no instance of Num and Bits?

2009-05-08 Thread Neil Mitchell
> Err, I'm not seeing the danger of this > (+) :: forall a. (Num a) => a -> a -> a > Doesn't this require the two parameters to be the same instance of Num? I didn't at first, then I remembered: 1 + True = fromInteger 1 + True And if we have Num for Bool, it type checks. Thanks Neil __

Re: [Haskell-cafe] Why is Bool no instance of Num and Bits?

2009-05-08 Thread Neil Mitchell
> Does that also mean that you could write: > > if 3 - 4 then ... else ...  (= if (fromInteger 3 :: Bool) - (fromInteger 4 > :: Bool) then ... else ...) No. 3 - 4 is an Integer, the proposal is to convert Bools to Ints, not Ints to Bools. Of course, Lennart has been asking for precisely this funct

Re: [Haskell-cafe] Generating Haskell with associated types (and kind annotations)

2009-05-09 Thread Neil Mitchell
Hi > I guess I should write the "skeleton" of the code I want to generate, > get HSE to parse it, and then replace the parts I want to change of > the AST with what I need? Is there a nicer way (TH-like?) to get the > modified AST into GHC than prettyprinting the AST again and asking GHC > to comp

Re: Can HLint help spot space leaks? (was: Re: [Haskell-cafe] Generating Haskell with associated types (and kind annotations))

2009-05-09 Thread Neil Mitchell
Hi Jason, > Hi Neil, > A bit off-topic, but your post reminded me:  Does HLint currently help the > user find space leaks?  For example, does it recommend strict folds instead > of lazy folds?  I looked at the FAQ but this was not listed.  I don't really > know how feasible this is. It spots when

Re: [Haskell-cafe] Hoogle: converting binary .hoo into text?

2009-05-12 Thread Neil Mitchell
Hi > Sure. We're building with a graphical representation of a Haskellish > language (a tiny subset of Haskell actually). The target audience is > graphical artists and designers. For testing, I would like to populate the > library with primitives taken from the Haskell base libraries.  I tried >

Re: [Haskell-cafe] haskellnet

2009-05-14 Thread Neil Mitchell
Hi Email the original author, if you can. Ideally work with them to upload a working version to hackage. If they're not interested hopefully they'll make you the new maintainer. If you can't contact them, just upload a new version anyway - as long as it's done for the benefit of the community and

[Haskell-cafe] community.haskell.org and code.haskell.org problems

2009-05-18 Thread Neil Mitchell
Hi, I regularly (almost daily) have problems reaching both community and code.haskell.org, getting 500 server error messages. I've decided to make all my Haskell code available on community, which means that when it goes down, I can't access my repos - which is not great. Is there a reason for th

[Haskell-cafe] community.haskell.org and code.haskell.org problems

2009-05-18 Thread Neil Mitchell
Hi, I regularly (almost daily) have problems reaching both community and code.haskell.org, getting 500 server error messages. I've decided to make all my Haskell code available on community, which means that when it goes down, I can't access my repos - which is not great. Is there a reason for th

Re: [Haskell-cafe] Anglohaskell?

2009-05-26 Thread Neil Mitchell
Sounds fun! I have no time to organise it, but someone should. It really isn't that hard! Thanks Neil On Mon, May 25, 2009 at 4:47 PM, Philippa Cowderoy wrote: > Is anyone up for Anglohaskell this year? > > Perhaps more importantly, is anyone willing to step forward to run it? I > can lend a ha

[Haskell-cafe] Re: ANN: New repository and trac for haskell-src-exts

2009-05-26 Thread Neil Mitchell
Hi Niklas, Do you want people to cc bugs they want to "vote" for - like the GHC people do? Thanks Neil On Tue, May 26, 2009 at 12:56 AM, Niklas Broberg wrote: > Hi all, > > In preparation for my GSoC project, I've set up some new > infrastructure for the haskell-src-exts package. Instead of re

Re: [Haskell-cafe] HXT XmlPicklers - TH Derivation

2009-06-03 Thread Neil Mitchell
Hi Max, > I have developed some simple TH code to automatically derive XmlPickler > instances for my types and if there is interest, I will clean it up and > submit a patch.  Its not complete, but is a start.  Any interest? Why not submit it to derive: http://community.haskell.org/~ndm/derive Th

Re: [Haskell-cafe] GSoC update: sneak peek at the live heap profiler

2009-06-03 Thread Neil Mitchell
Hi Gergely, I haven't seen this blog on planet.haskell.org, but it definitely should be! Instructions on how to have it added are on that page. Thanks, Neil 2009/6/3 Patai Gergely : > Hello everyone, > > finally there's a bit of eye candy for anyone interested in the heap > profiling project: >

Re: [Haskell-cafe] Parsing .dot files?

2009-06-25 Thread Neil Mitchell
Hi I have some code, but never got round to uploading it or turning it in to a package. If the graphviz package doesn't have what you want I'm happy to give you a copy. (I would attach the code but I don't have it on this machine) Thanks Neil On Wed, Jun 24, 2009 at 7:38 AM, minh thu wrote: > 2

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-19 Thread Neil Mitchell
Hi Max, > For fun, I spent a few hours yesterday implement support for this > syntax in GHC, originally propsed by Koen Claessen: > [k, "=", v, " " | (k, v) <- [("foo", "1"), ("bar", "2")] > ["foo", "=", "1", " ", "bar", "=", "2", " "] > > This is a generalisation of list comprehensions that

Re: [Haskell-cafe] Implicit concatenation in list comprehensions

2009-07-21 Thread Neil Mitchell
> Except that it's ugly compared to the proposed extension. With the > extension you can put things in the same, right place: > > renderGhcOptions opts = >     ghcOptExtraPre opts > >  -- source search path >  ++ [ "-i"      | not (null (ghcOptSearchPath opts)) ] >  ++ [ "-i", dir | dir <- ghcOptSe

Re: [Haskell-cafe] Need feedback on my Haskell code

2009-07-28 Thread Neil Mitchell
Hi Kashyap, My first suggestion would be to run HLint over the code (http://community.haskell.org/~ndm/hlint) - that will spot a few easy simplifications. Thanks Neil On Tue, Jul 28, 2009 at 2:04 PM, CK Kashyap wrote: > Hi Everyone, > I managed to write up the line drawing function using the fo

Re: [Haskell-cafe] Haskell interface files: Why used? What about same data in object files?

2009-08-04 Thread Neil Mitchell
Hi > Some good reasons for having a separate interface are:  they can be > human-readable and human-writable (ghc's do not fulfill this criterion); > they can be used to bootstrap mutually recursive modules in the absence of > any object files (ghc uses .hs-boot files instead); other tools can ext

Re: [Haskell-cafe] Typeclass for functions taking different kinds of strings

2009-08-05 Thread Neil Mitchell
Hi > is there currently a library that makes unifying them easy? I currently use this library: http://community.haskell.org/~ndm/darcs/tagsoup/Text/StringLike.hs Not yet released, and rather specific to what I was wanting to do, but does work for me. I'm happy for people to steal bits from that

Re: [Haskell-cafe] Typeclass for functions taking different kinds of strings

2009-08-05 Thread Neil Mitchell
Hi > It looks nice but is not really a solution for passing large amounts > of data efficiently. Converting everything to String creates too much > overhead for large chunks of data. There is uncons, which never creates big strings. But yes, adding more bulk operations (i.e. lookup) might be nece

Re: [Haskell-cafe] Request for Changelogs

2009-08-06 Thread Neil Mitchell
Hi > I’m involved in packaging Haskell stuff for Debian. Now, the Debian > tools we have for that tell me „Hlint has a new version, 1.6.5, which is > newer than the one you packages, 1.6.4. > > Huh, nice. What has changed? Is it relevant for Debian? Is it worth a > new upload? There is no easy way

Re: [Haskell-cafe] Request for Changelogs

2009-08-06 Thread Neil Mitchell
Hi http://community.haskell.org/~ndm/darcs/hlint/CHANGES.txt That will now be updated for future HLint releases. Thanks, Neil On Thu, Aug 6, 2009 at 3:49 PM, Joachim Breitner wrote: > Hi, > > Am Donnerstag, den 06.08.2009, 15:39 +0100 schrieb Neil Mitchell: >> > So please, pa

Re: [Haskell-cafe] Hugs faster and more reliable than GHC for large list monad 'do' block

2009-08-06 Thread Neil Mitchell
Hi I think the issue you're running in to with 6.4 is this one: http://hackage.haskell.org/trac/ghc/ticket/830 - known and fixed a while back. Thanks Neil On Thu, Aug 6, 2009 at 9:59 PM, Dan Weston wrote: > I assume for the return line, you meant to return a list, not a tuple. ghc > doesn't sup

Re: [Haskell-cafe] Using -Nx Option with GHC

2009-08-08 Thread Neil Mitchell
Hi Mark, > I compile with > > ghc --make -O2 -threaded That should work - try deleting all .o/.obj files and the executable and trying to compile again. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/

Re: [Haskell-cafe] Request for comments - hdnsomatic

2009-08-16 Thread Neil Mitchell
Hi An easy way to get some instant feedback is to run HLint on it: http://community.haskell.org/~ndm/hlint The results are: C:\Neil\hlint>hlint Example.hs Example.hs:42:1: Warning: Use liftM Found: readFile p >>= return . lines >>= return . map (second tail . break (== '=') . filter (/= '

Re: [Haskell-cafe] Request for comments - hdnsomatic

2009-08-17 Thread Neil Mitchell
de la Lic. en Estudios Políticos y Gobierno > Universidad de Guadalajara > > > > 2009/8/16 Neil Mitchell >> >> Hi >> >> An easy way to get some instant feedback is to run HLint on it: >> http://community.haskell.org/~ndm/hlint >> >> The results are: &

Re: [Haskell-cafe] Re: Changelogs and "available since"

2009-08-17 Thread Neil Mitchell
Hi >> I would use hoogle for this. Currently it stores the package name and >> the symbols of the modules about a package. > > What do you think about hayoo?  I prefer this to hoogle, as hayoo has > more complete database across hackage packages, AFAIK Hayoo gets it package database out of haddoc

Re: [Haskell-cafe] Unifcation and matching in Abelian groups

2009-08-19 Thread Neil Mitchell
Hi, I ran your code thought HLint (http://community.haskell.org/~ndm/hlint), and it suggested a couple of things (mainly eta reduce). The most interesting suggestions are on your main function: > main :: IO () > main = > do > done <- isEOF > case done of > True -> return (

Re: [Haskell-cafe] Unifcation and matching in Abelian groups

2009-08-19 Thread Neil Mitchell
Hi > I've given up on using if-then-else in do expressions.  They confuse > emacs.  There is a proposal for Haskell' to fix the problem, but until > then, I will not use them in do expressions. It's a shame, there are ways of indenting them that work, but they're not as natural. It's a wart, but

Re: [Haskell-cafe] Error during hlint install ?

2009-08-29 Thread Neil Mitchell
Hi Dusan, >  Am I doing something wrong if I get the following error during cabal > installation of hlint? Is there any way how to solve it? The problem is that version 1.15 of hscolour released recently is incompatible with 1.13 which HLint was being tested against. I've now switched over to hs

[Haskell-cafe] Community.haskell.org is down

2009-09-13 Thread Neil Mitchell
Hi, http://community.haskell.org/ seems to be down for me. In general, who should this be reported to? Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] RE: [Haskell] boilerplate boilerplate

2007-06-01 Thread Neil Mitchell
Hi Alex, The problem with Data.Derive is that I now have a pre-processor cycle as part of my build process. Automatic and universal Data and Typeable instance deriving should just be built into Haskell. Not if you use the template haskell support. We don't currently have a "deriveAll" command,

Re: [Haskell-cafe] Failure in GHC compilation

2007-06-02 Thread Neil Mitchell
Hi Monique, Unless you REALLY need to, I'd recommend using the precompiled binaries on Windows: http://haskell.org/ghc/download_ghc_661.html Thanks Neil On 6/2/07, Monique Monteiro <[EMAIL PROTECTED]> wrote: Hi, has anyone any idea about what may cause the following error in GHC compilati

Re: [Haskell-cafe] Haskell on a PDA (was "Implementing Mathematica")

2007-06-02 Thread Neil Mitchell
Hi I seem to recall that Aarne Ranta ran Hugs on a (Sharp) Zaurus PDA at one of the ICFPs a few years back. Aha, here in fact is a picture of his GF (Grammatical Framework), written in Haskell, running on a Zaurus: There seem to be

Re: [Haskell-cafe] Re: I just don't get it (data structures and OO)

2007-06-03 Thread Neil Mitchell
Hi > You could also use 'compositional functional references'. These are > introduced in the paper "A Functional Programming Technique for Forms in > Graphical User Interfaces" by Sander Evers, Peter Achten and Jan Kuper. > > I've written a template haskell function to derive Refs from a data

Re: [Haskell-cafe] Ref and Derive

2007-06-03 Thread Neil Mitchell
Hi Speaking of Derive: I tried to install it just a few days ago, and failed. 'Derive' needed 'filepath-any', which needed 'directory-any', which I couldn't find (in Hackage or on Neil's website). Either: 1) Use GHC 6.6.1, which comes with filepath 2) Use the hackage version: http://hackage.h

[Haskell-cafe] Template Haskell, information about data constructor types

2007-06-03 Thread Neil Mitchell
Hi I'm trying to write a function: reaches :: Type -> Q [Type] The intention is that reaches (Either Bool [Int]) would return [Either Bool [Int], Bool, [Int], Int] - i.e. all types which are contained by the initial type at any level. I took a shot at this: getTypes :: Type -> Q [Type] getTyp

Re: [Haskell-cafe] Template Haskell, information about data constructor types

2007-06-04 Thread Neil Mitchell
Hi Simon, On 6/4/07, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: | Where typeApp splits a type to find its constructor, ctorTypes gets | the types of the fields, and dataCtors gets the constructors in a data | type. Unfortunately reify doesn't seem to work on types. Is it | possible to do what

Re: [Haskell-cafe] RE: [Haskell] boilerplate boilerplate

2007-06-04 Thread Neil Mitchell
Hi On 6/1/07, Alex Jacobson <[EMAIL PROTECTED]> wrote: I suppose a deriveAll command from template haskell would work. Is that really possible? Asking people who have more knowledge of template haskell, I'm still not sure. What it would really rely on is: getDataDeclarationsInCurrentModule

Re: [Haskell-cafe] How to read -ddump-hi output (and other phases) from GHC

2007-06-04 Thread Neil Mitchell
Hi 4.16.3. How to read Core syntax http://www.haskell.org/ghc/docs/latest/html/users_guide/options-debugging.html#id3130643 I found that -ddump-simpl gives you good information, in a readable form - I much prefer it to reading the .hcr files. Thanks Neil _

[Haskell-cafe] Parsec problem

2007-06-05 Thread Neil Mitchell
Hi, I'm using parsec to parse something which is either a "name" or a "type". The particular test string I'm using is a type, but isn't a name. I want things to default to "name" before "type". Some examples of the parsec function, and the result when applied to a test string: parsecQuery = do

[Haskell-cafe] Re: Parsec problem

2007-06-06 Thread Neil Mitchell
Hi I suppose "names" or "try names" succeeds without consuming input, but calling parsecQuery fails for another reason that you haven't shown, I assume (from the docs) that "try names" doesn't consume input (the try is meant to take care of that). I also know that "spaces ; types" works on it

Re: [Haskell-cafe] Re: Parsec problem

2007-06-06 Thread Neil Mitchell
Hi Tillmann > http://www.cs.york.ac.uk/fp/darcs/hoogle/src/Hoogle/Query/Parser.hs My guess: names can never fail, so types is never tried, and eof fails. You are correct. Thanks very much! Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: standard function

2007-06-06 Thread Neil Mitchell
Hi @Neil: Is there a way to let hoogle find this kind of stuff? It would be a quite complex inference though. Finding map ($ x) - no. As soon as you allow combination of functions in various combinations, the search space explodes. For every function you now have id map, id . map f etc - way t

[Haskell-cafe] Use of Data.Generics.everywhere'

2007-06-06 Thread Neil Mitchell
Hi, I'm looking into SYB, and I'm trying to find examples where people have used everywhere' (note: not everywhere, but with a \prime) - unfortunately I can't find any. I've tried Google Code Search, and it comes up with one rather trivial example which could equally have been everywhere. The ori

Re: [Haskell-cafe] Good article on why implementing a functional back end is really different

2007-06-07 Thread Neil Mitchell
Hi Help. I need support for a technical argument: why going to an intermediate form for an existing functional back end like Haskell really, truly is better for implementing a functional language than is going to an intermediate form like the Java intermediate form and re-doing all the various

Re: [Haskell-cafe] GTK2HS

2007-06-07 Thread Neil Mitchell
Hi Andrew, I just tried to install Gtk2hs and got an error message to the effect that it cannot be installed since I have GHC 6.6.1, which isn't 6.6 or 6.4. Anybody know how to fix this? Am I being dumb? Are you running Windows or Linux? If Linux, where did you get your package from? After a

[Haskell-cafe] Re: [Haskell] ANN: Catch (first ever release)

2007-06-08 Thread Neil Mitchell
Following up on haskell-cafe: Hi Chris, > For the last few years I've been working on a pattern-match checker > for Haskell, named Catch. I'm now happy to make a release: I would love to use this with regex-tdfa (and the other regex-* modules). At the moment regex-tdfa is uses a few extension

Re: [Haskell-cafe] LaTeX

2007-06-09 Thread Neil Mitchell
Hi Does anybody know what the magical LaTeX command is to turn (say) "++" into two overprinted pluses? (As seems to be fashionable...) Just use lhs2tex and you get this (and more) for free. http://www.informatik.uni-bonn.de/~loeh/lhs2tex/ Thanks Neil _

Re: [Haskell-cafe] Useful IDE features - What abaut automatically adding import statements?

2007-06-17 Thread Neil Mitchell
Hi It's one of the features I want to add to GuiHaskell (http://www-users.cs.york.ac.uk/~ndm/guihaskell/). Once the main code base is finished, things like this should be relatively easy. Thanks Neil On 6/17/07, Marc Weber <[EMAIL PROTECTED]> wrote: On Sun, Jun 17, 2007 at 10:58:04AM +0100,

Re: [Haskell-cafe] IDE?

2007-06-17 Thread Neil Mitchell
Hi And that's why IMHO for Windows users, one needs a friendly IDE to get started with Haskell in a modern way. And the Windows version should comply to the Windows styleguides. I use TextPad and WinHugs, you might find Visual Studio meets your needs better. Both those options are properly Win

[Haskell-cafe] Re: [Haskell] ANN: Uniplate 1.0

2007-06-18 Thread Neil Mitchell
Hi The draft paper feels more readable and up-to-date than the manual. That's very true! Originally there was a manual, now there is a paper - perhaps I should take the manual down if people think that the paper is sufficiently readable? However I have one comment about it. In the section on

[Haskell-cafe] Re: [Haskell] ANN: Uniplate 1.0

2007-06-18 Thread Neil Mitchell
Hi Thinking about this slightly further... For the implementation, Data.Derive has a special case for lists, tuples and Maybe. Its a shame that only a restricted number of types are supported - things like Data.Map/Data.Set can be supported perfectly, apart from restrictions in Template Haskell

Re: [Haskell-cafe] latex table and backgound color

2007-06-19 Thread Neil Mitchell
Hi Adrian, You are probably better asking on a latex mailing list - this one is mainly for questions about the Haskell programming language. If you are on IRC the #latex channel on irc.freenode.net is very good - that's where I go with my latex questions! Thanks Neil On 6/19/07, Adrian Dusa <[

Re: [Haskell-cafe] Avoiding "Non-exhaustive patterns in function f"

2007-06-19 Thread Neil Mitchell
Hi > I understand this has nothing to do with type checking, but why can't the > compiler give a warning about this? Or is this by design or because it is > impossible to check with more complex recursive data types? Take a look at Catch from Neil Mitchell: http://www-users.cs.y

Re: [Haskell-cafe] A probably-stupid question about a Prelude implementation.

2007-06-22 Thread Neil Mitchell
Hi Michael, You're wrong :) foldr (||) False (repeat True) Gives: True Remember that in Haskell everything is lazy, which means that the || short-circuits as soon as it can. Thanks Neil On 6/22/07, Michael T. Richter <[EMAIL PROTECTED]> wrote: So, I'm now going over the code in the

Re: [Haskell-cafe] Odd lack of laziness

2007-06-23 Thread Neil Mitchell
Hi I have most of a Data.Nat library done, I should finish it off and release it... Thanks Neil On 6/22/07, Stefan O'Rear <[EMAIL PROTECTED]> wrote: On Fri, Jun 22, 2007 at 07:14:39PM +0100, Andrew Coppin wrote: > Chaddaï Fouché wrote: > >You should be using BS.null f rather than BS.length f

Re: [Haskell-cafe] Parallel + exceptions

2007-06-23 Thread Neil Mitchell
Hi Parallel: I think this is pretty well solved with STM. I think STM is production ready in GHC. Exceptions: These are less well solved, people are still thinking about some of the issues. In general, you probably don't want to use exceptions too much - the Maybe Monad is often a better choice.

Re: [Haskell-cafe] A Query Language for Haskell Terms

2007-06-23 Thread Neil Mitchell
Hi Regarding the first point, I am aware of with the following options: - SYB (Data.Generics..) You may also want to take a look at Uniplate: http://www-users.cs.york.ac.uk/~ndm/uniplate/ That (or SYB) should take care of your query/transform issues, and the ACL stuff can be layered on top of

Re: [Haskell-cafe] Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-23 Thread Neil Mitchell
Hi > All the puffing about the advantages of > strong typing look pretty silly if code hangs up on an incomplete > pattern. Okay... people who don't worry so much about incomplete patterns believe that they get things done. There are trade offs in type systems about how much effort you want to

Re: [Haskell-cafe] Re: Best idiom for avoiding Defaulting warnings with ghc -Wall -Werror ??

2007-06-24 Thread Neil Mitchell
Hi 1) The programmer has to detail in some form the proof that his program terminates. Arguably, he ought to do so anyway but he doesn't need to write his proof in a way that can be checked by a dumb computer. Take for example minimum = head . sort minimum [1..] gives _|_ non-termination mi

Re: [Haskell-cafe] Constructing a datatype given just its constructor as a string?

2007-06-24 Thread Neil Mitchell
Hi mkConstr :: String -> Constr parseData :: (Data a) => String -> a fromConstr, plus a bit of work to create the constructor. http://www.haskell.org/hoogle/?q=fromConstr Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://ww

Re: [Haskell-cafe] Wikipedia archiving bot - code review

2007-06-25 Thread Neil Mitchell
Hi You may find that the slow down is coming from your use of the TagSoup library - I'm currently reworking the parser to make sure its fully lazy and doesn't space leak. I hope that the version in darcs tomorrow will have all those issues fixed. Thanks Neil On 6/26/07, Gwern Branwen <[EMAIL

Re: [Haskell-cafe] Language semantics

2007-06-30 Thread Neil Mitchell
Hi > What's Uniplate? http://www-users.cs.york.ac.uk/~ndm/uniplate/ may help to answer that question. I haven't even finished understanding SYB, yet, though; I'm still mystified by how to use Data.Generics.Twins.gzipWithQ. So, I'm not at a stage where I can usefully contrast Uniplate with the D

Re: [Haskell-cafe] Getting debugging/logging info?

2007-07-02 Thread Neil Mitchell
Hi SystemLogging.LogInfo("Did Something"); SystemLogging.LogInfo("x is " + x ); How can we do something similar in Haskell? See trace: http://www.haskell.org/hoogle/?q=trace Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http:/

Re: Re[2]: [Haskell-cafe] Binary serialization, was Re: Abstraction leak

2007-07-05 Thread Neil Mitchell
Hi It's not a great experience now, but hopefully things are moving in the right direction. - Found crypto 3.0.3 on hackage. - Tried to build, it depends on NewBinary Cabal-install is intended to remove this problem, so that you can say "i want crypto" and it gets everything that requires.

Re: [Haskell-cafe] Trying to make a Typeable instance

2007-07-07 Thread Neil Mitchell
Hi Adrian You can use Data.Derive to do this for you: http://www-users.cs.york.ac.uk/~ndm/derive/ Or DrIFT: http://repetae.net/~john/computer/haskell/DrIFT/ Thanks Neil On 7/7/07, Adrian Hey <[EMAIL PROTECTED]> wrote: Adrian Hey wrote: > Hello, > > I'm trying to make the type (ListGT map k a

Re: [Haskell-cafe] Trying to make a Typeable instance

2007-07-07 Thread Neil Mitchell
Hi data ListGT map k a = Empt | BraF ![k] a !(map (ListGT map k a)) | BraE ![k] !(map (ListGT map k a)) deriving( Typeable ) Not in Haskell, only in GHC. Thanks Neil ? On 7/7/07, Adrian Hey <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to make the type (ListGT map k a) an

Re: [Haskell-cafe] Too many packages on hackage? :-)

2007-07-08 Thread Neil Mitchell
Hi Looks like there's too many packages on hackage.haskell.org now for a single page listing: http://hackage.haskell.org/packages/archive/pkg-list.html Perhaps we can have a page with just the categories, with subpages hanging off? Please don't. With one large page I can search the entir

Re: [Haskell-cafe] Fun with ByteStrings [was: A very edgy language]

2007-07-08 Thread Neil Mitchell
Hi I guess the question that's really burning in my mind is "if ByteString is so much faster than [x], why can't you just do the same optimisations to [x]?" In other words, "why should I need to alter my code to get all this fusion goodness?" You already get some benefit of fusion with lists:

Re: [Haskell-cafe] In-place modification

2007-07-08 Thread Neil Mitchell
Hi btw, you doesn't need to use unix in order to play with ghc HEAD - you can download compiled windows binary Seriously? I'm pretty sure I tried to do that and couldn't... Seriously. Thanks to Igloo, you can even download a GHC nightly complete with an installer! It doesn't get any easier th

Re: [Haskell-cafe] Elementary question about Type Constraints

2007-07-09 Thread Neil Mitchell
Hi Is there any reason to use [EMAIL PROTECTED] instead of just t? If there is, please tell me! I can't think of any reason at all! I'm pretty sure they desugar to the same thing. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

  1   2   3   4   5   6   7   8   9   10   >