Re: [Haskell-cafe] Cabal failures...
I just want to say that Windows support is much better than one could get the impression from this thread. I use Haskell on Windows as well as OSX and Linux. I think it works very well now, previously one had to know a bit of trickery to get things done. I don't think I have run into any more trouble on Windows than on the unixes, certainly there has been less headaches than with OSX (mostly GHC there), and you don't get the distro-hackage tension as on Linux. It is a bit annoying that packages depending on unix don't just quit upfront instead of installing a scad of dependencies first. But a mucked up package database that this thread is about can happen on any platform. The problem seems to be that cabal-install is so wonderfully easy to use that it obscures that there are no guarantees that things will just work and that it is often quite possible to fix it yourself by a tweak. If people think that what cabal install does behind the scenes is some advanced magic, it will not occur to them that they can do cabal unpack, fix the problem, and then cabal configure, cabal build and cabal install. Niklas 2012/11/21 Erik de Castro Lopo mle...@mega-nerd.com: Albert Y. C. Lai wrote: This counter-argument is flawed. Why limit oneself to one's own household? (Garage? Basement?) Get out more! Visit a friend. If that friend is not a coder, they are unlikely to have the dev tools installed. Talk to an internet cafe owner for a special deal to run one's own programs. Ditto. Rent virtual machine time in the cloud. I've already thrown a bunch of money at the microsoft machine for very poor results. If someone else set up and ran windows VMs and gave me access that would make testing on windows far more attractive. I just found that Amazon AWS has a free teir that includes windows as an option: https://aws.amazon.com/free/ Its still a huge sink of time and effort to set one up to a state where its ready to build haskell packages. Maybe if someone set up a github project that contained a script that could be downloaded onto a bare windows machine and then bootstrap that machine into a full haskell dev machine you might see some progress on this front. Erik -- -- Erik de Castro Lopo http://www.mega-nerd.com/ ___ 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
Re: [Haskell-cafe] Cabal failures...
On Tue, Nov 20, 2012 at 7:34 PM, Albert Y. C. Lai tre...@vex.net wrote: On 12-11-20 08:20 PM, Johan Tibell wrote: This logic is flawed. More than 90% of computers having Windows doesn't imply that 90% of all computers in a given household runs Windows. What's the probability that your household has a Windows computer if you're a programmer that don't live with your parents? What if that programmer is an open source contributor. Surely not 90%. This counter-argument is flawed. Why limit oneself to one's own household? (Garage? Basement?) Get out more! Visit a friend. Talk to an internet cafe owner for a special deal to run one's own programs. Rent virtual machine time in the cloud. There are many creative, flexible, low-cost possibilities. The key word here is low-cost. None of them are as low as the cost of Linux, Solaris, *BSD, etc. Those are all free. There's even free VM software available for them so you don't have to dedicate a machine to it. This actually makes the argument running in the other direction more telling. It's less expensive for Windows users to get Unix/Linux than Unix/Linux users to get Windows. If you want a Haskell environment to work in, install VirtualBoxOSE (free) and a Linux distro (also free) and work on that. Of course, the real cost is that maintaining software that you aren't using on a regular basis - which includes software you do use on a platform you don't - is a PITA. Given that, why would anyone doing something for free want to spend money for (access to a) copy of Windows to build/test software they aren't going to use? Insert standard OSS rant about do it yourself here. mike ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AST Rewriting
This is one of the problem Syntactic aims to solve, but it requires you to use a different representation of expressions (for good or bad). If you want to keep your existing representation, then you have to use a generic programming library that supports GADTs. I know at least the Spine approach supports GADTs, but the library on Hackage seems too incomplete to be useful: http://hackage.haskell.org/package/spine I don't know if there are other libraries that support GADTs. You can also have a look at CompData: http://hackage.haskell.org/package/compdata It is similar to Syntactic (i.e. requires a different representation), but it has a richer library of generic traversals. / Emil 2012-11-21 04:20, Alexander Solla skrev: Have you read Data types a la carte? The 'syntactic' package implements the ideas, but it was a little dense for my purposes when I looked (I just wanted data types, a la carte; it focuses on manipulating ASTs defined a la carte). It might be what you need, or you can roll your own based on the paper. On Tue, Nov 20, 2012 at 3:21 PM, Steve Severance ssevera...@alphaheavy.com mailto:ssevera...@alphaheavy.com wrote: Hi Everyone, I am trying to build a function to rewrite and AST. I have and AST which is designed to represent a computation graph. I will present a simplified version here designed to illustrate the problem. I have tried numerous ways of rewriting it including uniplate, recursion and Edward Kmett's implementation of plate in his lens package. My AST is defined using GADTs as follows: class (ReflectDescriptor a, Typeable a, Wire a) = ProtoBuf a data Expression a b where OpenTable :: (ProtoBuf b) = Int - Table - Expression () b OpenFile :: (ProtoBuf b) = Int - String - Expression () b WriteFile :: (Typeable a, ProtoBuf b) = Int - String - Expression a b - Expression b () WriteTable :: (Typeable a, ProtoBuf b) = Int - Table - Expression a b - Expression b () Map :: (ProtoBuf a, ProtoBuf b, ProtoBuf c) = Int - (a - b) - Expression c a - Expression a b LocalMerge :: (ProtoBuf a) = Int - [Expression c a] - Expression c a The user can create code inside a Monad Transformer like so: q - query $ do table - openTable myTable transform - map someFunc table writeTable otherTable transform As part of this language the compiler I am building would need to for instance transform OpenTable into a series OpenFile nodes with a LocalMerge to merge the results together. So uniplate cannot work over GADTs if I recall correctly. I exchanged emails with Edward and he explained that for the lens case I would need something like an indexed lens family from his indexed package which is not implemented yet but which may be in the future. The issue with recursion is that as you recurse through the AST the a b on the Expression change and GHC cannot compile it because it wants the a b to be the same on each recursive call. My question to the Haskell community is how might one develop AST rewriting functionality. One possible solution is stripping the types away from GHC and doing all the type checking myself. That doesn't seem very good. Another possibility that I have looked at was using hoopl. It seems very compatible given that it is built for describing and optimizing data flow which I am doing however the learning curve looks quite steep. I have been reluctant so far to invest the time in it. Has anyone developed something similar? What recommendations do you have? Thanks. Steve ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto: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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install...
The latest version of cabal-dev on Hackage does not seem to have had its dependencies updated for GHC 7.6. Try installing off github (https://github.com/creswick/cabal-dev). Ian Sturdy From: haskell-cafe-boun...@haskell.org [haskell-cafe-boun...@haskell.org] on behalf of Eric Velten de Melo [ericvm...@gmail.com] Sent: Tuesday, November 20, 2012 7:54 PM To: Johan Tibell Cc: Gregory Guthrie; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] cabal install... I have a dream of one day being able to install leksah without having to downgrade ghc. Right now I can't even install cabal-dev with cabal. It will break ghc if I do. 2012/11/20 Johan Tibell johan.tib...@gmail.com: On Tue, Nov 20, 2012 at 1:10 PM, Gregory Guthrie guth...@mum.edu wrote: Hmm, Now when I tried to run Leksah, I get not only some broken packages (which I can avoid for my current project), but: command line: cannot satisfy -package-id base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917: base-4.5.1.0-7c83b96f47f23db63c42a56351dcb917 is unusable due to missing or recursive dependencies: integer-gmp-0.4.0.0-c15e185526893c3119f809251aac8c5b (use -v for more information) So I tried to install base, then re-install it, but both fail; Any hints? From this email and some of the previous emails it seems that your package DB is in a pretty bad state, most likely from using --force-reinstalls. When Cabal warns you that this will break stuff it actually means it. :) My suggestion is that you rm -rf ~/.ghc/x86_64-linux-7.6.1 # or equivalent on your system. Then reinstall all the packages you want by listing them all at once cabal install pkg1 pkg2 pk3 By listing them all together cabal-install tries to come up with an install plan that is globally consistent for all of them. -- Johan ___ 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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install... Trying to recover
Thanks for the suggestion, I’ll do that. Here goes: I deleted the ../user/appdata/roaming/ghc and ../cabal files, an uninstalled Haskell-platform. (No trace of anything ghc on the disk.) Then reinstalled Haskell, and ran “cabal update”, it said there was a new cabal-install, but trying to install it fails (below), so I went ahead with the current version. The error seems odd to me (cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.), that an older version depends on a newer one? So now I have; (from Windows - Haskell-platform 2012.4.0.0) GHCi = The Glorious Glasgow Haskell Compilation System, version 7.4.2 Cabal = cabal-install version 0.14.0, using version 1.14.0 of the Cabal library I then tried to reload all my previous packages, (all at once?!), but it fails, out of memory (w/8GB of memory!) So I split it into sections, and tried the first one; it lists a lot of new installs, and then fails (full list at http://pastebin.com/5ywdUjgX) The first chunk of installs gives this: ... cabal: The following packages are likely to be broken by the reinstalls: QuickCheck-2.4.2 haskell-platform-2012.4.0.0 Use --force-reinstalls if you want to install anyway. I don't understand how it can want to break the Haskell-platform, sounds dangerous! And the second this: G:\Cabalcabal install Boolean Craft3e Craft3e GLFW GLURaw GLUT HTTP IORefCAS Me moTrie MonadCatchIO-mtl NumInstances ObjectName OpenGL OpenGLRaw QuickCheck SDL SHA StateVar Tensor abstract-deque abstract-par active aeson alex ansi-terminal array asn1-data attoparsec attoparsec-conduit base-unicode-symbols base64-bytest ring bits-atomic blaze-builder blaze-builder-conduit blaze-html blaze-markup bla ze-svg bmp buildwrapper byteorder cabal-dev case-insensitive cereal certificate clientsession cmdargs colour comonad conduit contravariant cookie cpphs cprng-ae s cpu criterion crypto-api crypto-conduit crypto-pubkey-types cryptocipher crypt ohash css-text data-default date-cache diagrams-core diagrams-lib diagrams-svg d list email-validate entropy erf failure fast-logger file-embed filepath filesyst em-conduit ghc-paths gloss gtk2hs-buildtools Resolving dependencies... In order, the following would be installed: Boolean-0.1.1 (new package) ... cabal: The following packages are likely to be broken by the reinstalls: regex-posix-0.95.1 regex-compat-0.95.1 regex-posix-0.94.4 regex-compat-0.93.1 parsec-3.1.1 fgl-5.4.2.4 fgl-5.4.2.3 QuickCheck-2.4.0.1 network-2.3.1.0 haskell-platform-2012.4.0.0 cgi-3001.1.7.4 HTTP-4000.2.5 regex-posix-0.95.2 regex-compat-0.95.1 regex-posix-0.95.1 regex-compat-0.95.1 Use --force-reinstalls if you want to install anyway. So I have a typical situation where it won't install, and gives an option to –force, but that seems to lead to more problems? Do I just have some packages which are intrinsically incompatible, and I have to choose between them? Not sure how to proceed. Any help or hints appreciated! :-) –––- Cabal install cabal-install Configuring Cabal-1.16.0.3... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package process-1.1.0.1 requires base-4.5.0.0 package pretty-1.1.1.0 requires base-4.5.0.0 package old-time-1.1.0.0 requires base-4.5.0.0 package old-locale-1.0.0.4 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.0.0 package directory-1.1.0.2 requires base-4.5.0.0 package deepseq-1.3.0.0 requires base-4.5.0.0 package containers-0.4.2.1 requires base-4.5.0.0 package bytestring-0.9.2.1 requires base-4.5.0.0 package array-0.4.0.0 requires base-4.5.0.0 package Win32-2.2.2.0 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.1.0 package Cabal-1.16.0.3 requires base-4.5.1.0 package Cabal-1.16.0.3 requires filepath-1.3.0.0 package process-1.1.0.1 requires filepath-1.3.0.0 package directory-1.1.0.2 requires filepath-1.3.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package bytestring-0.9.2.1 requires ghc-prim-0.2.0.0 package base-4.5.0.0 requires ghc-prim-0.2.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires integer-gmp-0.4.0.0 package base-4.5.0.0 requires integer-gmp-0.4.0.0 Building Cabal-1.16.0.3... Preprocessing library Cabal-1.16.0.3... command line: cannot satisfy -package-id array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9 (use -v for more information) cabal: Error: some packages failed to install: Cabal-1.16.0.3 failed during the building phase. The exception was: ExitFailure 1 cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install. (more -v details at: http://pastebin.com/Y2BuMjBP )
Re: [Haskell-cafe] AST Rewriting
On Wed, Nov 21, 2012 at 2:56 PM, Emil Axelsson wrote: This is one of the problem Syntactic aims to solve, but it requires you to use a different representation of expressions (for good or bad). If you want to keep your existing representation, then you have to use a generic programming library that supports GADTs. I know at least the Spine approach supports GADTs, but the library on Hackage seems too incomplete to be useful: http://hackage.haskell.org/**package/spinehttp://hackage.haskell.org/package/spine Just a comment on this library (since I put it up there). Yes, it is incomplete. It's only been used for students in a course. It is not intended for practical use. Even if it were complete, the Type datatype is closed, meaning the library cannot be extended to support new types, which probably won't necessarily be that useful to you. The spine view works nicely as a model of SYB but not so nicely as a library for generic programming. Regards, Sean ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install... Trying to recover
You should have a ghc directory under appdata, with i386-mingw32-7.4.2\package.conf.d under it. There GHC tracks what packages it knows about. Niklas From: Gregory Guthrie Sent: 2012-11-21 15:11 To: Johan Tibell Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] cabal install... Trying to recover Thanks for the suggestion, I’ll do that. Here goes: I deleted the ../user/appdata/roaming/ghc and ../cabal files, an uninstalled Haskell-platform. (No trace of anything ghc on the disk.) Then reinstalled Haskell, and ran “cabal update”, it said there was a new cabal-install, but trying to install it fails (below), so I went ahead with the current version. The error seems odd to me (cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.), that an older version depends on a newer one? So now I have; (from Windows - Haskell-platform 2012.4.0.0) GHCi = The Glorious Glasgow Haskell Compilation System, version 7.4.2 Cabal = cabal-install version 0.14.0, using version 1.14.0 of the Cabal library I then tried to reload all my previous packages, (all at once?!), but it fails, out of memory (w/8GB of memory!) So I split it into sections, and tried the first one; it lists a lot of new installs, and then fails (full list at http://pastebin.com/5ywdUjgX) The first chunk of installs gives this: ... cabal: The following packages are likely to be broken by the reinstalls: QuickCheck-2.4.2 haskell-platform-2012.4.0.0 Use --force-reinstalls if you want to install anyway. I don't understand how it can want to break the Haskell-platform, sounds dangerous! And the second this: G:\Cabalcabal install Boolean Craft3e Craft3e GLFW GLURaw GLUT HTTP IORefCAS Me moTrie MonadCatchIO-mtl NumInstances ObjectName OpenGL OpenGLRaw QuickCheck SDL SHA StateVar Tensor abstract-deque abstract-par active aeson alex ansi-terminal array asn1-data attoparsec attoparsec-conduit base-unicode-symbols base64-bytest ring bits-atomic blaze-builder blaze-builder-conduit blaze-html blaze-markup bla ze-svg bmp buildwrapper byteorder cabal-dev case-insensitive cereal certificate clientsession cmdargs colour comonad conduit contravariant cookie cpphs cprng-ae s cpu criterion crypto-api crypto-conduit crypto-pubkey-types cryptocipher crypt ohash css-text data-default date-cache diagrams-core diagrams-lib diagrams-svg d list email-validate entropy erf failure fast-logger file-embed filepath filesyst em-conduit ghc-paths gloss gtk2hs-buildtools Resolving dependencies... In order, the following would be installed: Boolean-0.1.1 (new package) ... cabal: The following packages are likely to be broken by the reinstalls: regex-posix-0.95.1 regex-compat-0.95.1 regex-posix-0.94.4 regex-compat-0.93.1 parsec-3.1.1 fgl-5.4.2.4 fgl-5.4.2.3 QuickCheck-2.4.0.1 network-2.3.1.0 haskell-platform-2012.4.0.0 cgi-3001.1.7.4 HTTP-4000.2.5 regex-posix-0.95.2 regex-compat-0.95.1 regex-posix-0.95.1 regex-compat-0.95.1 Use --force-reinstalls if you want to install anyway. So I have a typical situation where it won't install, and gives an option to –force, but that seems to lead to more problems? Do I just have some packages which are intrinsically incompatible, and I have to choose between them? Not sure how to proceed. Any help or hints appreciated! :-) –––- Cabal install cabal-install Configuring Cabal-1.16.0.3... Warning: This package indirectly depends on multiple versions of the same package. This is highly likely to cause a compile failure. package process-1.1.0.1 requires base-4.5.0.0 package pretty-1.1.1.0 requires base-4.5.0.0 package old-time-1.1.0.0 requires base-4.5.0.0 package old-locale-1.0.0.4 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.0.0 package directory-1.1.0.2 requires base-4.5.0.0 package deepseq-1.3.0.0 requires base-4.5.0.0 package containers-0.4.2.1 requires base-4.5.0.0 package bytestring-0.9.2.1 requires base-4.5.0.0 package array-0.4.0.0 requires base-4.5.0.0 package Win32-2.2.2.0 requires base-4.5.0.0 package filepath-1.3.0.0 requires base-4.5.1.0 package Cabal-1.16.0.3 requires base-4.5.1.0 package Cabal-1.16.0.3 requires filepath-1.3.0.0 package process-1.1.0.1 requires filepath-1.3.0.0 package directory-1.1.0.2 requires filepath-1.3.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package bytestring-0.9.2.1 requires ghc-prim-0.2.0.0 package base-4.5.0.0 requires ghc-prim-0.2.0.0 package integer-gmp-0.4.0.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires ghc-prim-0.2.0.0 package base-4.5.1.0 requires integer-gmp-0.4.0.0 package base-4.5.0.0 requires integer-gmp-0.4.0.0 Building Cabal-1.16.0.3... Preprocessing library Cabal-1.16.0.3... command line: cannot satisfy -package-id array-0.4.0.0-3cf1bc3f5cd0078adea24752c18081b9 (use -v for
Re: [Haskell-cafe] cabal install... Trying to recover
On Wed, Nov 21, 2012 at 9:08 AM, Gregory Guthrie guth...@mum.edu wrote: The error seems odd to me (cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.), that an older version depends on a newer one? There was a minor bug in the Cabal library necessitating a point release. cabal-install was unaffected; why make a new release just to have pretty versioning? I then tried to reload all my previous packages, (all at once?!), but it fails, out of memory (w/8GB of memory!) i386 or x86-64? 8GB isn't really 8GB on the former. So I split it into sections, and tried the first one; it lists a lot of new installs, and then fails (full list at http://pastebin.com/5ywdUjgX) You're explicitly asking it for a new version of HTTP, which is asking for trouble. More worrisome is that it's still asking for new versions of base, which means it's still confused about what version of ghc is installed. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix/linux, openafs, kerberos, infrastructure http://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install... Trying to recover
OK; I took HTTP out, but still get the same error; cabal: The following packages are likely to be broken by the reinstalls: QuickCheck-2.4.2 haskell-platform-2012.4.0.0 Use --force-reinstalls if you want to install anyway. One thing I notice; Ghc reports: G:\Cabalghc --version The Glorious Glasgow Haskell Compilation System, version 7.4.2 But I did notice that I had an environment variable (from some previous install, I think openCV?) of: GHC_VERSION=7.4.1 So I updated that to 7.4.2 And retried, same results. But then, ghc-pkg check reports: The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. HTTP-4000.2.3 haskell-platform-2012.2.0.0 I have no idea where the 2012.2 comes from. Any suggestions? --- From: Brandon Allbery [mailto:allber...@gmail.com] Subject: Re: [Haskell-cafe] cabal install... Trying to recover So I split it into sections, and tried the first one; it lists a lot of new installs, and then fails (full list at http://pastebin.com/5ywdUjgX) You're explicitly asking it for a new version of HTTP, which is asking for trouble. More worrisome is that it's still asking for new versions of base, which means it's still confused about what version of ghc is installed. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install... Trying to recover
On Wed, Nov 21, 2012 at 12:06 PM, Gregory Guthrie guth...@mum.edu wrote: OK; I took HTTP out, but still get the same error; cabal: The following packages are likely to be broken by the reinstalls: QuickCheck-2.4.2 haskell-platform-2012.4.0.0 Use --force-reinstalls if you want to install anyway. Right, that was not intended to be a complete fix or anything, just a note. This is the important part, and what I noted immediately afterward --- did you happen to notice there was anything in the message after that first part? (Although I'm not asking this first so it also may not actually exist, I guess) One thing I notice; Ghc reports: G:\Cabalghc --version The Glorious Glasgow Haskell Compilation System, version 7.4.2 ** ** But I did notice that I had an environment variable (from some previous install, I think openCV?) of: GHC_VERSION=7.4.1 So I updated that to 7.4.2 And retried, same results. There is more going on than just that environment variable; this is what the base stuff that you have been ignoring is trying to tell you. You still have both compilers installed, and their packages are somehow jumbled together. This is breaking your installation. Unfortunately, as I am neither particularly familiar with Windows nor able to access your system (which is probably for the best for both of us), I can't really help you with figuring out why you have two GHC versions' packages mixed together. But as long as you do, cabal will be trying to upgrade the base package, which is the actual source of the breakage. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix/linux, openafs, kerberos, infrastructure http://sinenomine.net ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] cabal install... Trying to recover
Thanks. I’ll try to do another cleanup, but not sure what more I can uninstall or clean out! I did a system search for *ghc* and came up empty before reinstall; will try again. I have now managed to get from some broken packages to a broken system! ☺ --- Subject: Re: [Haskell-cafe] cabal install... Trying to recover This is the important part, and what I noted immediately afterward --- did you happen to notice there was anything in the message after that first part? (Although I'm not asking this first so it also may not actually exist, I guess) One thing I notice; Ghc reports: G:\Cabalghc --version The Glorious Glasgow Haskell Compilation System, version 7.4.2 There is more going on than just that environment variable; this is what the base stuff that you have been ignoring is trying to tell you. You still have both compilers installed, and their packages are somehow jumbled together. This is breaking your installation. Unfortunately, as I am neither particularly familiar with Windows nor able to access your system (which is probably for the best for both of us), I can't really help you with figuring out why you have two GHC versions' packages mixed together. But as long as you do, cabal will be trying to upgrade the base package, which is the actual source of the breakage. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
Greetings, Daniel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
Tits? On Nov 21, 2012, at 9:43 PM, Daniel Trstenjak daniel.trsten...@gmail.com wrote: Greetings, Daniel ___ 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
Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
The belly is between them... I can't unsee. Homero Cardoso de Almeida B.el Ciência da Computação - UNIFEI 2006 + homero...@gmail.com + (19) 8139-3700 On Wed, Nov 21, 2012 at 3:48 PM, MigMit miguelim...@yandex.ru wrote: Tits? On Nov 21, 2012, at 9:43 PM, Daniel Trstenjak daniel.trsten...@gmail.com wrote: Greetings, Daniel ___ 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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
On Wed, Nov 21, 2012 at 9:48 AM, MigMit miguelim...@yandex.ru wrote: Tits? This is not appropriate for this mailing lists, please take it elsewhere. I suggest http://www.reddit.com/r/ruby ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
( . ) . ( . ) in particular seems to be a generalization of flip on - hopefully there's something cleaner and more general though. On Wed, Nov 21, 2012 at 9:43 AM, Daniel Trstenjak daniel.trsten...@gmail.com wrote: Greetings, Daniel ___ 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
[Haskell-cafe] naming and packaging things
Hi everyone, As anyone following this mailinglist surely noticed, there are a few issues regarding haskell packaging. Lot of discussion is going on about how cabal contributes to the problems and how things could be fixed by making our tools smarter (which is a great thing to do IMHO). I think though, that there might be other ways to deal with or at least reduce the problems. One of those ways would be expressing the influence of changes in a package's public API, using the name of a package instead of just version numbers. I mean, in case a major backwards incompatible/breaking change happens, one would change the name of the package/namespaces a.s.o. And with breaking I really mean that kind of oh my ... now I have to rewrite this part of my application because of this. Simple additions to the API do not count as breaking because existing functionality is left alone. This way, incompatible versions of the same library can coexist without any problems right within the same program if one chose to do so even allowing for improved transition processes for larger application I presume. It would easily be possible to safely install newer versions of the same package without breaking things. There are more open source libraries/projects as it seems, which use this approach (version number in the package name) such as the kdelibs, gtk, beautifulsoup, apache and bind. One example: take an application which needs two libraries A and B which both depend on library C. Now lets assume that A uses a slightly older version of C and B uses a version with a major incompatibility. In the current versioning scheme, there could be major problems causing development delays or custom forks to emerge a.s.o. But following the other naming method, in case library C chooses to introduce a major breaking change in the public API, a new package C2 is born, which can be used alongside C (and effectively is a different library anyway I think). The choice for the new version of C (C2) is explicit within the name and all related things. I am aware of the fact that this would take more forethought on library design, but I do not think that this alone would be a bad idea anyway. Also it would be difficult to enforce this, but well, a good maintainer would be aware of this anyway, taking care of not introducing breaking changes to the public API I guess. Furthermore we would end up with more packages with different names (but probably the same idea behind it) which would be on hackage. Likely it would be nice to add some grouping or tagging features which would bind them together for everyone browsing the packages. But I think this is probably not a real problem but more a cosmetic one. I really would like to see this discussed here. What would be the good and the bad of promoting this kind of versioning. I am looking forward to hear what you think. Best regards, Rico Moorman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] AST Rewriting
Thanks everyone for your replies. I am not wedded to GADTs or really anything else. I am going to give the syntactic library a shot over the next few days and see if I can hack something together. Thanks again for the papers and libraries. Steve On Wed, Nov 21, 2012 at 6:10 AM, Sean Leather leat...@cs.uu.nl wrote: On Wed, Nov 21, 2012 at 2:56 PM, Emil Axelsson wrote: This is one of the problem Syntactic aims to solve, but it requires you to use a different representation of expressions (for good or bad). If you want to keep your existing representation, then you have to use a generic programming library that supports GADTs. I know at least the Spine approach supports GADTs, but the library on Hackage seems too incomplete to be useful: http://hackage.haskell.org/**package/spinehttp://hackage.haskell.org/package/spine Just a comment on this library (since I put it up there). Yes, it is incomplete. It's only been used for students in a course. It is not intended for practical use. Even if it were complete, the Type datatype is closed, meaning the library cannot be extended to support new types, which probably won't necessarily be that useful to you. The spine view works nicely as a model of SYB but not so nicely as a library for generic programming. Regards, Sean ___ 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
Re: [Haskell-cafe] Cabal failures...
Let's put some numbers on this. (1) In this country, you can buy a second-hand dual core desktop for NZD 200 (roughly USD 165, EUR 130). You can buy a new laptop for NZD 400 (roughly USD 330, EUR 260). Not fancy machines, but more than adequate to compile and build stuff. Shipping adds a fair bit to prices here. So it _must_ be possible to buy a Windows box of some kind adequate for compiling, building, and testing open source software, for even less than that in North America or Europe. It's really *NOT* the price of the box-with-Windows-installed. (2) This department has a mix of Mac OS X, Linux (running on Apple dual-boot boxes), and Windows (running on Apple dual-boot boxes). The University has quite a few Windows labs. There would be _no_ students at this University who did not have ready access to a Windows machine whenever they wanted one. The servers in the department all run some flavour of UNIX, true. (3) Given an intel Solaris, intel Linux, or intel Mac OS X box, VirtualBox is free. You can run Windows in VirtualBox. Microsoft offer a full Windows 7 Professional licence to University students for USD 30. So I really don't buy the idea of a student finding it hard to get Windows. My University is part of the MSDN Academic Alliance, so staff get stuff for no money of their own. Windows 7 Home Premium is USD 200, Professional USD 300. Probably better to buy a cheap box that already has Windows. What about software? Well, Microsoft Visual Studio Professional 2012 is several times more expensive than the box it runs on, and Office is not cheap either. There are, as always, special deals, e.g., https://www.dreamspark.com/Product/Product.aspx?productid=34 seems to make VC++ 2008 available free to students, and the MSDN Academic Alliance makes this stuff easy for staff to get. For everyone else, Eclipse and NetBeans are free, and so are Cygwin and Mingw. It took me about a day to download and install a large amount of free software, giving me quite a decent environment. (Of course, if someone were paying me to do this, the University would charge NZD 150/hour, so free = NZD 1200 ...) I even had Microsoft SUA (Services for Unix Applications -- think of it as Cygwin from Microsoft but with a less horribly ugly terminal font). I had ghc and OCaml and SWI Prolog and Squeak and Dolphin Smalltalk and lots of good stuff. So it's not really the availability of software either. So am I a happy Windows hacker? Actually, no. I had a working tolerable setup under Windows Vista. Despite its bad press, I have to say I never had any trouble with Vista. Then my (the department's) Mac laptop needed something done to it -- I forget what -- and they said while we're at it, it would simplify our lives if we upgraded the Windows side to Windows 7 like everyone else has now. I said, OK, but I _really_ don't want to lose any of my programs. And they lost everything beginning with the letters M-Z, and what they didn't lose stopped working. Apparently when Windows went 64 bit they didn't leave \Program Files\ alone and add a \Program Files 64\ directory. Oh no! Now \Program Files\ was exclusively for 64-bit programs, and 32-bit ones were supposed to be in \Program Files (x86)\. You can guess what that did to the surviving remnants of my environment. How long did it take to rebuild my environment? I don't know. Except for installing Cygwin I haven't done it. The changes to the user interface -- apparently just for the sake of change, because absolutely nothing I do has become easier for me -- did nothing for my facility with the system, and having to spend half an hour installing updates every time I boot into Windows doesn't increase my enjoyment. I don't want to even _think_ about Windows 8. On 21/11/2012, at 3:21 PM, Clark Gaebel wrote: +1 to this. The friction of finding, setting up, and using Windows isn't even comparable to just sshing into another unix box and testing something quickly. As a university student, I also find it relatively rare that I get to test on a Windows machine. My personal computer runs linux, my technical friends run linux or osx, and my non-technical ones run osx. Also, all the school servers that I have access to run either FreeBSD or Linux. If I want to run something on linux system, I have about 40 different computers that I can ssh into and run code on. If I want to run something on osx, I just have to call a friend and ask if they can turn on their computer and allow me to ssh in (to my own account, of course). If I want to run something on Windows, I have to track down a friend (in person!), ask to borrow their computer for a few hours, get administrator access to install the Haskell Platform, get frustrated that HP hasn't been upgraded to 7.6, and give up. It's just not practical, especially for the large amount of small (500 LOC)
Re: [Haskell-cafe] [Haskell] [ANN] gtk2hs-0.12.4
* wagne...@seas.upenn.edu wagne...@seas.upenn.edu [2012-11-21 13:48:35-0500] Today, we welcome into the world version 0.12.4 of Gtk2Hs[1], a set of Haskell bindings to many of the libraries included in the Gtk+/Gnome platform. Gtk+ is an extensive and mature multi-platform toolkit for creating graphical user interfaces. Great — thanks to you and John for keeping it alive. Roman ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] isLetter vs. isAlpha
Hello! I saw a question on StackOverflow about the difference between isAlpha and isLetter today. One of the answers stated that the two functions are interchangeable, even though they are implemented differently. I decided to find out whether the difference in implementation influences performance, and look what I found: import Criterion.Main import Data.Char fTest name f list = bgroup name $ map (\(n,c) - bench n $ whnf f c) list tests = [(latin, 'e'), (digit, '8'), (symbol, '…'), (greek, 'λ')] main = defaultMain [fTest isAlpha isAlpha tests, fTest isLetter isLetter tests] produces this table (times are in nanoseconds): latin digit symbol greek - - -- - isAlpha | 156 212 368310 isLetter | 349 344 383310 isAlpha is twice as fast on latin inputs! Does it mean that isAlpha should be preferred? Why isn’t isLetter defined in terms of isAlpha in Data.Char? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
I use .@. (sometimes ...) .#. .$. for the two three and four dot variations. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Common function names for '(.) . (.)', '(.) . (.) . (.)' ...?
The composition package on hackage has a few operators for this family of operations too http://hackage.haskell.org/packages/archive/composition/1.0.1.0/doc/html/Data-Composition.html On Wed, Nov 21, 2012 at 05:03:33PM -0500, Thomas Bereknyei wrote: I use .@. (sometimes ...) .#. .$. for the two three and four dot variations. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] fixed-length bit-vectors
Hi all, My goal, eliminate the failure case in 'byte': https://gist.github.com/4128503 I don't want my 'byte' function to fail at runtime or return $ Left vector not 8 bits. I want it to return a Word8 for an 8-bit bit-vector or not compile. Is there an existing library that offers fixed-length vectors as a thin veneer over the 'vector' package? I see 'vector-static', but it is unmaintained and hasn't been touched in years. Alternatively, there's 'VecN', but having already learned 'vector', I'd like to know if there is an existing solution that uses it. Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Weekly News: Issue 251
Welcome to issue 251 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers the week of November 4 to 17, 2012. Quotes of the Week * Ralith: [why some people don't use conduits/pipes] also, I think at least some people are waiting for edwardk to write his version. * edwardk: f -| g means that f a - b is isomorphic to a - g b (for arrows in the appropriate categories) * edwardk: @type (^.) lambdabot: s - Getting a s t a b - a byorgey: I would not like to be getting a stab, thank you * edwardk: I mean we're so oop even our member accessors have diagrams explaining their member accessors. * shapr: hylo! That's the category theorist greeting. * shachaf: type AbstractAlgebra a = Abstract a - a * nicoo: Yet many Writers concern themselves with issues of State, imaginary or real * rwbarton: when you learn C, watch out for the keyword return, it doesn't do what you'd expect * Oleg: We show how to program with the law of excluded middle. We specifically avoid call/cc, which is overrated. Top Reddit Stories * Haskell Platform 2012.4.0.0 is out Domain: self.haskell, Score: 89, Comments: 21 On Reddit: [1] http://goo.gl/BPno4 Original: [2] http://goo.gl/BPno4 * A Khan Academy style tutorial on generalized algebraic data types Domain: apfelmus.nfshost.com, Score: 56, Comments: 7 On Reddit: [3] http://goo.gl/kXQ0a Original: [4] http://goo.gl/NWn3B * Cartesian Closed Comic #17: Typing Domain: ro-che.info, Score: 53, Comments: 24 On Reddit: [5] http://goo.gl/6c4Uy Original: [6] http://goo.gl/dZeDx * Cartesian Closed Comic #18: Equality Domain: ro-che.info, Score: 53, Comments: 8 On Reddit: [7] http://goo.gl/8Qf9d Original: [8] http://goo.gl/XCyuB * Natural Language Processing for the Working Programmer (in Haskell!) Domain: nlpwp.org, Score: 50, Comments: 17 On Reddit: [9] http://goo.gl/3yLTZ Original: [10] http://goo.gl/BleWX * Waiting for garbage collection can kill parallelism? Domain: ics.p.lodz.pl, Score: 50, Comments: 7 On Reddit: [11] http://goo.gl/iUPlD Original: [12] http://goo.gl/N0kiV * foldr is made of monoids Domain: byorgey.wordpress.com, Score: 47, Comments: 12 On Reddit: [13] http://goo.gl/Y0mz5 Original: [14] http://goo.gl/IxKov * Solving Cabal Hell: vetted packages, multiple hackages Domain: yesodweb.com, Score: 46, Comments: 67 On Reddit: [15] http://goo.gl/dkzMz Original: [16] http://goo.gl/lDjuj * Parallel falling sand game with Repa Domain: github.com, Score: 45, Comments: 16 On Reddit: [17] http://goo.gl/G6MGG Original: [18] http://goo.gl/cP1zH * Agda, Epigram or Idris. Which one to learn Domain: self.haskell, Score: 38, Comments: 61 On Reddit: [19] http://goo.gl/3PGVo Original: [20] http://goo.gl/3PGVo * Fun with Fay - A ring oscillator Domain: skybluetrades.net, Score: 38, Comments: 6 On Reddit: [21] http://goo.gl/mGvcZ Original: [22] http://goo.gl/bJxCI * Introduction to Category Theory 1: Course Overview Domain: youtube.com, Score: 37, Comments: 6 On Reddit: [23] http://goo.gl/fbfYR Original: [24] http://goo.gl/Nx5SH * HALO: Haskell to Logic through Denotational Semantics [PDF] Domain: research.microsoft.com, Score: 35, Comments: 6 On Reddit: [25] http://goo.gl/V0RWs Original: [26] http://goo.gl/oCzUw * How to write Python in Haskell: State and Either Domain: stackoverflow.com, Score: 34, Comments: 25 On Reddit: [27] http://goo.gl/Z80yb Original: [28] http://goo.gl/W933i * What is foldr made of? Domain: web.jaguarpaw.co.uk, Score: 30, Comments: 22 On Reddit: [29] http://goo.gl/LdS9X Original: [30] http://goo.gl/I2uzX * How to shoot yourself in the foot with Haskell Domain: ics.p.lodz.pl, Score: 29, Comments: 34 On Reddit: [31] http://goo.gl/CcvZB Original: [32] http://goo.gl/SJYvd * Happstack, Fay, Acid-State: Shared Datatypes are Awesome Domain: happstack.com, Score: 29, Comments: 8 On Reddit: [33] http://goo.gl/AUtj6 Original: [34] http://goo.gl/cYQr1 * ANN: OpenGL packages update Domain: haskell.org, Score: 28, Comments: 7 On Reddit: [35] http://goo.gl/0SN7O Original: [36] http://goo.gl/PbtlT * How can I cleanly/consistently work with 3 different Exception-raising schemes? Domain: self.haskell, Score: 28, Comments: 22 On Reddit: [37] http://goo.gl/Xf4sq Original: [38] http://goo.gl/Xf4sq Top StackOverflow Questions * What are paramorphisms? votes: 39, answers: 1 Read on SO: [39] http://goo.gl/V6rXq * In pure functional languages, is there an algorithm to get the inverse function? votes: 35, answers: 9 Read on SO: [40] http://goo.gl/wBtqv * What are free monads?
[Haskell-cafe] naming and packaging things
Hi everyone, As anyone following this mailinglist surely noticed, there are a few issues regarding haskell packaging. Lot of discussion is going on about how cabal contributes to the problems and how things could be fixed by making our tools smarter (which is a great thing to do IMHO). I think though, that there might be other ways to deal with or at least reduce the problems. One of those ways would be expressing the influence of changes in a package's public API, using the name of a package instead of just version numbers. I mean, in case a major backwards incompatible/breaking change happens, one would change the name of the package/namespaces a.s.o. And with breaking I really mean that kind of oh my ... now I have to rewrite this part of my application because of this. Simple additions to the API do not count as breaking because existing functionality is left alone. This way, incompatible versions of the same library can coexist without any problems right within the same program if one chose to do so even allowing for improved transition processes for larger application I presume. It would easily be possible to safely install newer versions of the same package without breaking things. There are more open source libraries/projects as it seems, which use this approach (version number in the package name) such as the kdelibs, gtk, beautifulsoup, apache and bind. One example: take an application which needs two libraries A and B which both depend on library C. Now lets assume that A uses a slightly older version of C and B uses a version with a major incompatibility. In the current versioning scheme, there could be major problems causing development delays or custom forks to emerge a.s.o. But following the other naming method, in case library C chooses to introduce a major breaking change in the public API, a new package C2 is born, which can be used alongside C (and effectively is a different library anyway I think). The choice for the new version of C (C2) is explicit within the name and all related things. I am aware of the fact that this would take more forethought on library design, but I do not think that this alone would be a bad idea anyway. Also it would be difficult to enforce this, but well, a good maintainer would be aware of this anyway, taking care of not introducing breaking changes to the public API I guess. Furthermore we would end up with more packages with different names (but probably the same idea behind it) which would be on hackage. Likely it would be nice to add some grouping or tagging features which would bind them together for everyone browsing the packages. But I think this is probably not a real problem but more a cosmetic one. I really would like to see this discussed here. What would be the good and the bad of promoting this kind of versioning? I am looking forward to hear what you think. Best regards, Rico Moorman P.S. sorry if you got this twice but I seem to have mail problems at the moment ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe