Re: [Haskell-cafe] Again, version conflicting problem with cabal-install

2012-06-20 Thread Magicloud Magiclouds
OK. I found cabal-src tool, which solved this perfect.

On Wed, Jun 20, 2012 at 9:22 AM, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 Hi,
  The names here were just placeholder. And I just found out the reason.
  Hackage magicloud is local (not from hackage.haskell.org), there is
 no its information in cabal INDEX (I assumed so). But this raised
 another question, how to reference a local hackage in .cabal. So the
 solver could use the dependencies originally defined but not the
 binary compiled (which dependencies are fixed)?

 On Tue, Jun 19, 2012 at 5:50 PM, Andres Löh andres.l...@googlemail.com 
 wrote:
 Hi.

 Hackage A depends on magicloud (any) and container (0.4.0.0), and
 hackage magicloud depends on container (any).
 Now I've installed magicloud, using container 0.5.0.0. Then I failed
 to install A, with any solver.

 So the solvers are using the status that is installed, not the
 definitions from original hackages?

 Could you please provide me with something I can reproduce? I'm not
 sure what you mean by A or magicloud. Are you saying they have no
 further dependencies except for the one on container? If you could
 just state which concrete packages have caused the problem, it'd
 probably be easier. The trace output of the modular solver with -v3
 would also help (send it to me personally if it's too long).

 Thanks.

 Andres



 --
 竹密岂妨流水过
 山高哪阻野云飞

 And for G+, please use magiclouds#gmail.com.



-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2012-06-20 Thread Henning Thielemann


On Tue, 19 Jun 2012, Jacques Carette wrote:


Its main novel features are:

* introduces a number of /testing strategies/ and /strategy combinators/
* introduces a variety of test execution methods
* guarantees uniform sampling (at each rank) for the random strategy
* guarantees both uniqueness and coverage of all structures for the
  exhaustive strategy
* introduces an /extreme/ strategy for testing unbalanced structures
* also introduces a /uniform/ strategy which does uniform sampling
  along an enumeration
* allows different strategies to be mixed; for example one can
  exhaustively test all binary trees up to a certain size, filled with
  random integers.
* complete separation between properties, generators, testing
  strategies and test execution methods



This sounds very interesting to me since I had a lot of trouble with 
changed test case distributions when switching from QuickCheck-1 to 
QuickCheck-2. It was mainly that tested numbers became much bigger in 
QuickCheck-2 and if I used the numbers as size of lists, then tests could 
not be run in reasonable time anymore. Thus I think more control over 
test-case generation is necessary.


QuickCheck is Haskell-98 and thus is very portable. I see that GenCheck 
needs some more extensions - type families, multi-parameter type classes, 
what else?


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Problem with plugins

2012-06-20 Thread Jeremy Shaw
I really have no idea. I am the new plugins maintainer -- but so far
that mostly means I am willing to apply darcs patches and uploading
things to hackage. I have not had a chance to really dig into plugins.

I will now make some wild guesses.

 1. does it matter if you compile with -O2 vs -O0 ?

 2. do those .o  files actually exist?

 3. Are there perhaps .o and .hi files in your project directory that
were compiled with GHC 7.0 but now you are trying to load them with =
7.0?

- jeremy

On Tue, Jun 19, 2012 at 10:30 AM, Timo von Holtz
timo.v.ho...@googlemail.com wrote:
 Hi,

 I'm currently working on extending the hascat Server. My problem is, that
 for whatever odd reason it will only work on GHC  7.0 or alternatively if I
 execute it with runghc or in ghci.
 If I compile it with GHC=7.0 and execute it, then I get this:

 $ ~/.cabal/bin/hascat config.xml
 Installing Root at /
 hascat: /home/tvh/.cabal/lib/plugins-1.5.2.1/ghc-7.4.1/HSplugins-1.5.2.1.o:
 unknown symbol `ghczm7zi4zi1_ErrUtils_zdsinsertzugo3_info'
 hascat: unloadObj: can't find
 `/usr/lib/ghc/binary-0.5.1.0/HSbinary-0.5.1.0.o' to unload
 user error (unloadObj: failed)
 Installing Hascat Server Info at /ServerInfo/
 hascat:
 /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
 unknown symbol `base_DataziMaybe_Nothing_closure'
 hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
 to unload
 user error (unloadObj: failed)
 Installing Hascat Application Manager at /Manager/
 hascat:
 /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
 unknown symbol `base_DataziMaybe_Nothing_closure'
 hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
 to unload
 user error (unloadObj: failed)
 Installing Hascat Application Deployer at /Deployer/
 hascat:
 /usr/lib/haskell-packages/ghc/lib/zlib-0.5.3.3/ghc-7.4.1/HSzlib-0.5.3.3.o:
 unknown symbol `base_GHCziForeignPtr_ForeignPtr_con_info'
 hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
 to unload
 user error (unloadObj: failed)
 Waiting for connections on port 8012

 Is there a way to make this work?

 Greetings
 Timo

 ___
 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] Problem with plugins

2012-06-20 Thread Timo von Holtz
I compile the files dynamically, so the compiler version is out of the
question. I already tested -O0.
In the modules I dynamically load, I import some of the modules the
main program also uses. I can reproduce the exact same error with this
simple example:

Main.hs:
module Main (main, add) where

import System.Plugins

add = (+1)

main :: IO ()
main = do
  putStrLn Loading
  makeAll Plug.hs []
  mv - load_ Plug.o [.] thing
  putStrLn Loaded
  case mv of
    LoadFailure msgs - putStrLn fail  print msgs
    LoadSuccess _ v - putStrLn success  print (v::Integer)

Plug.hs:
module Plug (thing) where

import Main

thing :: Integer
thing = add 1234000

- timo
2012/6/20 Jeremy Shaw jer...@n-heptane.com

 I really have no idea. I am the new plugins maintainer -- but so far
 that mostly means I am willing to apply darcs patches and uploading
 things to hackage. I have not had a chance to really dig into plugins.

 I will now make some wild guesses.

  1. does it matter if you compile with -O2 vs -O0 ?

  2. do those .o  files actually exist?

  3. Are there perhaps .o and .hi files in your project directory that
 were compiled with GHC 7.0 but now you are trying to load them with =
 7.0?

 - jeremy

 On Tue, Jun 19, 2012 at 10:30 AM, Timo von Holtz
 timo.v.ho...@googlemail.com wrote:
  Hi,
 
  I'm currently working on extending the hascat Server. My problem is, that
  for whatever odd reason it will only work on GHC  7.0 or alternatively if I
  execute it with runghc or in ghci.
  If I compile it with GHC=7.0 and execute it, then I get this:
 
  $ ~/.cabal/bin/hascat config.xml
  Installing Root at /
  hascat: /home/tvh/.cabal/lib/plugins-1.5.2.1/ghc-7.4.1/HSplugins-1.5.2.1.o:
  unknown symbol `ghczm7zi4zi1_ErrUtils_zdsinsertzugo3_info'
  hascat: unloadObj: can't find
  `/usr/lib/ghc/binary-0.5.1.0/HSbinary-0.5.1.0.o' to unload
  user error (unloadObj: failed)
  Installing Hascat Server Info at /ServerInfo/
  hascat:
  /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
  unknown symbol `base_DataziMaybe_Nothing_closure'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Installing Hascat Application Manager at /Manager/
  hascat:
  /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
  unknown symbol `base_DataziMaybe_Nothing_closure'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Installing Hascat Application Deployer at /Deployer/
  hascat:
  /usr/lib/haskell-packages/ghc/lib/zlib-0.5.3.3/ghc-7.4.1/HSzlib-0.5.3.3.o:
  unknown symbol `base_GHCziForeignPtr_ForeignPtr_con_info'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Waiting for connections on port 8012
 
  Is there a way to make this work?
 
  Greetings
  Timo
 
  ___
  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] Problem with plugins

2012-06-20 Thread Timo von Holtz
My example was somewhat wrong, since it only works with runghc = 7.0
and not 7.
Here a better example which has exactly the same issues as my code.

Main.hs:
module Main where

import Main1

main = main1

Main1.hs:
module Main1 (main1, add) where

import System.Plugins

add = (+1)

main1 :: IO ()
main1 = do
  putStrLn Loading
  makeAll Plug.hs []
  mv - load_ Plug.o [.] thing
  putStrLn Loaded
  case mv of
LoadFailure msgs - putStrLn fail  print msgs
LoadSuccess _ v - putStrLn success  print (v::Integer)

Plug.hs:
module Plug (thing) where

import Main1

thing :: Integer
thing = add 1234000

- timo

2012/6/20 Timo von Holtz timo.v.ho...@googlemail.com:
 I compile the files dynamically, so the compiler version is out of the
 question. I already tested -O0.
 In the modules I dynamically load, I import some of the modules the
 main program also uses. I can reproduce the exact same error with this
 simple example:

 Main.hs:
 module Main (main, add) where

 import System.Plugins

 add = (+1)

 main :: IO ()
 main = do
   putStrLn Loading
   makeAll Plug.hs []
   mv - load_ Plug.o [.] thing
   putStrLn Loaded
   case mv of
     LoadFailure msgs - putStrLn fail  print msgs
     LoadSuccess _ v - putStrLn success  print (v::Integer)

 Plug.hs:
 module Plug (thing) where

 import Main

 thing :: Integer
 thing = add 1234000

 - timo
 2012/6/20 Jeremy Shaw jer...@n-heptane.com

 I really have no idea. I am the new plugins maintainer -- but so far
 that mostly means I am willing to apply darcs patches and uploading
 things to hackage. I have not had a chance to really dig into plugins.

 I will now make some wild guesses.

  1. does it matter if you compile with -O2 vs -O0 ?

  2. do those .o  files actually exist?

  3. Are there perhaps .o and .hi files in your project directory that
 were compiled with GHC 7.0 but now you are trying to load them with =
 7.0?

 - jeremy

 On Tue, Jun 19, 2012 at 10:30 AM, Timo von Holtz
 timo.v.ho...@googlemail.com wrote:
  Hi,
 
  I'm currently working on extending the hascat Server. My problem is, that
  for whatever odd reason it will only work on GHC  7.0 or alternatively if 
  I
  execute it with runghc or in ghci.
  If I compile it with GHC=7.0 and execute it, then I get this:
 
  $ ~/.cabal/bin/hascat config.xml
  Installing Root at /
  hascat: /home/tvh/.cabal/lib/plugins-1.5.2.1/ghc-7.4.1/HSplugins-1.5.2.1.o:
  unknown symbol `ghczm7zi4zi1_ErrUtils_zdsinsertzugo3_info'
  hascat: unloadObj: can't find
  `/usr/lib/ghc/binary-0.5.1.0/HSbinary-0.5.1.0.o' to unload
  user error (unloadObj: failed)
  Installing Hascat Server Info at /ServerInfo/
  hascat:
  /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
  unknown symbol `base_DataziMaybe_Nothing_closure'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Installing Hascat Application Manager at /Manager/
  hascat:
  /home/tvh/.cabal/lib/hascat-system-0.2/ghc-7.4.1/HShascat-system-0.2.o:
  unknown symbol `base_DataziMaybe_Nothing_closure'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Installing Hascat Application Deployer at /Deployer/
  hascat:
  /usr/lib/haskell-packages/ghc/lib/zlib-0.5.3.3/ghc-7.4.1/HSzlib-0.5.3.3.o:
  unknown symbol `base_GHCziForeignPtr_ForeignPtr_con_info'
  hascat: unloadObj: can't find `/usr/lib/ghc/Cabal-1.14.0/HSCabal-1.14.0.o'
  to unload
  user error (unloadObj: failed)
  Waiting for connections on port 8012
 
  Is there a way to make this work?
 
  Greetings
  Timo
 
  ___
  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] Hackage 2 maintainership

2012-06-20 Thread Ben Gamari
Krzysztof Skrzętnicki gte...@gmail.com writes:

 Hi,

 Are there any news how things are going?

Things have been pretty stagnant yet again. I was more than a bit
over-optimistic concerning the amount of time I'd have available to put
into this project. Moreover, the tasks required to get Hackage into a
usable state weren't nearly as clear as I originally thought.

Unfortunately, those who have historically been very active in Hackage
development and would have been responsible for much of the recent work
in advancing Hackage 2 to where it is now have other demands on their
time. My understanding is there is a fair amount of half-completed code
floating around.

 What remains there to be done to get us to Hackage 2?

 I found this list of tickets:
 https://github.com/haskell/cabal/issues?labels=hackage2page=1state=open

 Is there anything more to be done?

This list is definitely a start. One of the issues that was also
realized is the size of the server's memory footprint. Unfortunately
acid-state's requirement that all data either be in memory or have no
ACID guarantees was found to be a bit of a limitation. If I recall
correctly some folks were playing around with restructuring the data
structures a bit to reduce memory usage. I really don't know what
happened to these efforts.

On the other hand, it seems that the test server is still ticking away
at http://hackage.factisresearch.com/ with an up-to-date package index,
so things are looking alright on that front.

At this point, it seems that we are in a situation yet again where
someone just needs to start applying gentle pressure and figure out
where we stand. I'm afraid especially now I simply don't have time to
take on this project in any serious capacity.

Perhaps one way forward would be to propose the project again as a GSoC
project next year. That being said, there is no guarantee that someone
would step up to finish it.

Just my two cents.

Cheers,

- Ben


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


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

2012-06-20 Thread Jacques Carette

On 20/06/2012 6:56 AM, Henning Thielemann wrote:
QuickCheck is Haskell-98 and thus is very portable. I see that 
GenCheck needs some more extensions - type families, multi-parameter 
type classes, what else?


FlexibleContexts and FlexibleInstances.

However, I am fairly sure that the multi-parameter type classes are not 
in fact needed.  Certainly a branch of the current implementation could 
easily be done that removes these without harming the functionality 
currently implemented, although it might harm some of the 
extensibility.  And I think most of the uses of 
FlexibleContexts/Instances are tied to these MPTCs.


The one use of type families is to implement a view or, if you prefer, 
the 'get' part of a lens.  With type families, this is extremely 
elegant.  If portability is really important, this too could probably be 
branched into an implementation that does this otherwise.


I am actively working on refactoring the LabelledPartition MPTC into 
simpler pieces, but you'll have to wait until gencheck-0.2 for that.


Jacques

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] [Word8] - FilePath using ghc's file system encoding

2012-06-20 Thread Joey Hess
I found myself writing the code below today, and thought I'd write to see if
there's a better way, perhaps one that doesn't use unsafePerformIO.

A sample use case for this is a program that reads a FilePath from a Handle,
and then operates on that file on disk. GHC uses a special encoding for
FilePaths that cleanly roundtrips invalid utf8, but for that to work,
the FilePath must be read using that encoding too. Neglecting to do that
would result in a program that worked for most filenames, but failed on edge
case non-utf8 encoded filenames.

Another way to deal with this problem is to first hSetEncoding using
GHC.IO.Encoding.getFileSystemEncoding, and then read from the Handle using
hGetLine, which applies the encoding to the data it reads. However, in this
case I needed to use ByteString to read from the Handle, and so needed a way to
convert from a ByteString to a FilePath. (Using RawFilePath would be another
approach, but reworking my program to use it isn't practical.)

Anyway, it seems there should be a pure way to encode a string with
GHC's filesystem encoding.

-

import qualified GHC.Foreign as GHC
import qualified GHC.IO.Encoding as Encoding
import System.IO.Unsafe
import Data.Bits.Utils -- from MissingH

{- Converts a [Word8] to a FilePath, encoding using the filesystem encoding.
 -
 - w82c produces a String, which may contain Chars that are invalid
 - unicode. From there, this is really a simple matter of applying the
 - file system encoding, only complicated by GHC's interface to doing so.
 -}
{-# NOINLINE encodeW8 #-}
encodeW8 :: [Word8] - FilePath
encodeW8 w8 = unsafePerformIO $ do
enc - Encoding.getFileSystemEncoding
GHC.withCString Encoding.char8 (w82s w8) (GHC.peekCString enc)

-- 
see shy jo


signature.asc
Description: Digital signature
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] relocation R_X86_64_PC32 against undefined symbol

2012-06-20 Thread Henning Thielemann


Just for the record:

I compiled with GHC and got the linker error:

/usr/bin/ld: dist/build/.../Module.dyn_o: relocation R_X86_64_PC32 against 
undefined symbol `..._xyz1_closure' can not be used when making a shared 
object; recompile with -fPIC



Problem was that I forgot to declare Module in the Cabal description.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-20 Thread Chris Dornan
[Sorry for the delay -- I missed this reply until prompted.]

Very nice, this looks quite straightforward. I wonder about two things:

 - Is it possible to pass configure-time flags to those libraries? For
   example, I would like to build haskeline with -fterminfo. Can
Hub
   do this?

 - How do you handle packages that depend on system libraries? hsdns,
   for example, requires the adns library to build. Does Hub know about
   this?

Well observed! There is currently no provision for getting special arguments
passed
to cabal install when rebuilding the packages -- a weakness that should be
addressed.

Chris



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] The use of continuation monad in C++

2012-06-20 Thread Bartosz Milewski
I published a blog for C++ programmers about the advantages of using the
continuation monad in dealing with asynchronous API, concurrency, and
parallelism. I explained the concepts in Haskell and the translated them
into C++.
http://fpcomplete.com/asynchronous-api-in-c-and-the-continuation-monad/

-- 
[:Bartosz:]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [Haskell] JustHub 'Sherkin' Release

2012-06-20 Thread Peter Simons
Hi Chris,

I'm also wondering about this issue:

 - How do you handle packages that depend on system libraries? hsdns,
   for example, requires the adns library to build. Does Hub know about
   this?

Does Hub know about system-level libraries that Haskell packages need to
build, like Gtk, ADNS, Avahi, etc.? 

Take care,
Peter


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12.1.2 (fixes some metadata issues)

2012-06-20 Thread Hilco Wijbenga
Hi Hamish,

On 19 June 2012 22:47, Hamish Mackenzie
hamish.k.macken...@googlemail.com wrote:
 This release has an important bug fix for the metadata download.
 When metadata was downloaded using libcurl it was not treated
 as binary data.  If you used one of our binary installers or if you
 built Leksah with the -flibcurl flag then it is likely you have bad
 metadata files.

I just tried (again) to install Leksah. I was wondering if you could
point out where I go wrong. I'm on a fully up-to-date Gentoo Linux
(kernel 3.4.3, 64 bit) box.

I ran the following commands (as described, more or less, on
http://leksah.org/download.html):

hilco@centaur ~ ~$ rm -rf .cabal/

hilco@centaur ~ ~$ cabal update
Downloading the latest package list from hackage.haskell.org

hilco@centaur ~ ~$ cabal install gtk2hs-buildtools
Resolving dependencies...
Downloading gtk2hs-buildtools-0.12.3.1...
Configuring gtk2hs-buildtools-0.12.3.1...
Building gtk2hs-buildtools-0.12.3.1...
... lots of output ...
Linking dist/build/gtk2hsC2hs/gtk2hsC2hs ...
Installing executable(s) in /home/hilco/.cabal/bin

hilco@centaur ~ ~$ cabal install leksah
Resolving dependencies...
In order, the following would be installed:
attoparsec-0.10.2.0 (reinstall) changes: text-0.11.2.2 added
binary-shared-0.8.2 (new version)
cairo-0.12.3.1 (new package)
enumerator-0.4.19 (reinstall) changes: text-0.11.2.2 added,
transformers-0.2.2.0 - 0.3.0.0
attoparsec-enumerator-0.3 (reinstall) changes: text-0.11.2.2 added
glib-0.12.3.1 (new package)
gio-0.12.3 (new package)
network-2.3.0.14 (reinstall) changes: parsec-3.1.2 - 3.1.3
hslogger-1.1.5 (reinstall) changes: mtl-2.0.1.0 - 2.1.1
pango-0.12.3 (new package)
gtk-0.12.3.1 (new package)
gtksourceview2-0.12.3.1 (new package)
ltk-0.12.1.0 (new package)
leksah-server-0.12.1.2 (new package)
regex-base-0.93.2 (reinstall) changes: mtl-2.0.1.0 - 2.1.1
regex-tdfa-1.1.8 (reinstall) changes: mtl-2.0.1.0 - 2.1.1, parsec-3.1.2 -
3.1.3
leksah-0.12.1.2 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
regex-posix-0.95.1
regex-compat-0.95.1
Use --force-reinstalls if you want to install anyway.

hilco@centaur ~ ~$ cabal install leksah --force-reinstalls
Resolving dependencies...
Warning: The following packages are likely to be broken by the reinstalls:
regex-posix-0.95.1
regex-compat-0.95.1
Continuing even though the plan contains dangerous reinstalls.
... lots of output ...
cabal: Error: some packages failed to install:
cairo-0.12.3.1 failed during the configure step. The exception was:
ExitFailure 1
gio-0.12.3 depends on glib-0.12.3.1 which failed to install.
glib-0.12.3.1 failed during the configure step. The exception was:
ExitFailure 1
gtk-0.12.3.1 depends on glib-0.12.3.1 which failed to install.
gtksourceview2-0.12.3.1 depends on glib-0.12.3.1 which failed to install.
leksah-0.12.1.2 depends on glib-0.12.3.1 which failed to install.
leksah-server-0.12.1.2 depends on glib-0.12.3.1 which failed to install.
ltk-0.12.1.0 depends on glib-0.12.3.1 which failed to install.
pango-0.12.3 depends on glib-0.12.3.1 which failed to install.

Any ideas?

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12.1.2 (fixes some metadata issues)

2012-06-20 Thread Albert Y. C. Lai

On 12-06-20 07:59 PM, Hilco Wijbenga wrote:


hilco@centaur ~ ~$ rm -rf .cabal/


I am not sure why you start with this.

If you do this for a clean start, see my
http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
for why it is not a clean start.

If you do this for some other purpose, nevermind.


... lots of output ...


I think that is the informative part.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12.1.2 (fixes some metadata issues)

2012-06-20 Thread Hilco Wijbenga
On 20 June 2012 18:22, Oliver Batchelor saul...@gmail.com wrote:
 Check the error given by cairo.

 cabal install cairo-0.12.3.1

Well, it wasn't cairo that was the problem but ...

 You probably need to put the .cabal/bin  in your PATH, so that the
 tools such as c2hs can run.

... indeed, adding .cabal/bin to my PATH allowed the install to finish
successfully.

Why doesn't cabal abort when a package fails to install? Why doesn't
it die if .cabal/bin isn't on the PATH? (Surely, that's easy to test
for?)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Weekly News: Issue 232

2012-06-20 Thread Daniel Santa Cruz
Welcome to issue 232 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of June 10 to 16, 2012.

Quotes of the Week

   * irene-knapp: ewtoombs: the universe is already an interactive
  quantum physics simulator

   * Philipp: While in Python every problem can be solved with a big
  enough Hashtable, in Haskell, every problem can be solved
  with an additional type parameter.

   * kulin: man, i am loving this existential quantification, i feel
like now i will use it incorrectly to solve every problem for sure

   * mekeor: xmonad is awesome (ignore the ambiguity, please)

Top Reddit Stories

   * Waldo - the Haskell powered codebase behind xkcd’s Umwelt comic
 Domain: self.haskell, Score: 75, Comments: 16
 On Reddit: [1] http://goo.gl/M2fGv
 Original: [2] http://goo.gl/M2fGv

   * “ARM is now a fully supported target platform for GHC,
 complete with GHCi support”
 Domain: haskell.org, Score: 60, Comments: 17
 On Reddit: [3] http://goo.gl/O0XK3
 Original: [4] http://goo.gl/0Fajp

   * 3D Mandelbrot in OpenGL from imperative to functional style.
 Domain: yannesposito.com, Score: 36, Comments: 8
 On Reddit: [5] http://goo.gl/5MKK1
 Original: [6] http://goo.gl/nzpvl

   * ANN: clckwrks - a Haskell blogging and CMS framework
 Domain: groups.google.com, Score: 35, Comments: 21
 On Reddit: [7] http://goo.gl/ROrHt
 Original: [8] http://goo.gl/WneBw

   * web server C10k benchmark: snap vs. erlang, go, node.js, java
 Domain: github.com, Score: 35, Comments: 5
 On Reddit: [9] http://goo.gl/r1Q1j
 Original: [10] http://goo.gl/eFlTm

   * GADTs
 Domain: haskellforall.com, Score: 33, Comments: 74
 On Reddit: [11] http://goo.gl/B41Ef
 Original: [12] http://goo.gl/rcL6I

   * Announcing Elm 0.2: Haskell integration (Yesod, HAppStack, and Snap),
 better error messages, larger examples, and more.
 Domain: self.haskell, Score: 30, Comments: 8
 On Reddit: [13] http://goo.gl/ENBPH
 Original: [14] http://goo.gl/ENBPH

   * command line options using applicative without Template Haskell
 Domain: github.com, Score: 28, Comments: 13
 On Reddit: [15] http://goo.gl/zqKGw
 Original: [16] http://goo.gl/eVSAb

   * Haskell and Yesod - Book on writing web applications in Haskell
 Domain: shop.oreilly.com, Score: 28, Comments: 5
 On Reddit: [17] http://goo.gl/0RdvE
 Original: [18] http://goo.gl/9qCEu

Top StackOverflow Questions

   * Tying the Knot with a State monad
 votes: 33, answers: 3
 Read on SO: [19] http://goo.gl/cMcRf

   * Lazy evaluation of terms in an infinite list in Haskell
 votes: 32, answers: 4
 Read on SO: [20] http://goo.gl/IyRJ1

   * What is going on with the types in this ghci session?
 votes: 17, answers: 1
 Read on SO: [21] http://goo.gl/3RVnN

   * the seq function and strictness
 votes: 14, answers: 2
 Read on SO: [22] http://goo.gl/f8u9G

   * Is it possible to “hide” language extensions?
 votes: 11, answers: 2
 Read on SO: [23] http://goo.gl/q4JQx

   * Rebinding do notation for indexed monads
 votes: 11, answers: 1
 Read on SO: [24] http://goo.gl/Z4lnx

   * Haskell: “how much” of a type should functions receive? and avoiding
 complete “reconstruction”
 votes: 9, answers: 1
 Read on SO: [25] http://goo.gl/2FFHu

   * Intelligent purely functional sets
 votes: 8, answers: 1
 Read on SO: [26] http://goo.gl/I7Tzb

   * Is there a better way to express the absolute error function in
 point-free notation?
 votes: 8, answers: 2
 Read on SO: [27] http://goo.gl/FFFek

   * GADTs vs. MultiParamTypeClasses
 votes: 7, answers: 2
 Read on SO: [28] http://goo.gl/3DYKI


Until next time,
Daniel Santa Cruz

References


   1. 
http://www.reddit.com/r/haskell/comments/uved7/waldo_the_haskell_powered_codebase_behind_xkcds/
   2. 
http://www.reddit.com/r/haskell/comments/uved7/waldo_the_haskell_powered_codebase_behind_xkcds/
   3. http://www.haskell.org/pipermail/haskell-cafe/2012-June/101704.html
   4. 
http://www.reddit.com/r/haskell/comments/uv07c/arm_is_now_a_fully_supported_target_platform_for/
   5. http://yannesposito.com/Scratch/en/blog/Haskell-OpenGL-Mandelbrot/
   6. 
http://www.reddit.com/r/haskell/comments/v4pzk/3d_mandelbrot_in_opengl_from_imperative_to/
   7. https://groups.google.com/forum/#!msg/clckwrks/58AwDSRRGoI/prrMP6fhtqMJ
   8. 
http://www.reddit.com/r/haskell/comments/uyr0y/ann_clckwrks_a_haskell_blogging_and_cms_framework/
   9. https://github.com/ericmoritz/wsdemo/blob/results-v1/results.md
  10. 
http://www.reddit.com/r/haskell/comments/v595l/web_server_c10k_benchmark_snap_vs_erlang_go/
  11. http://www.haskellforall.com/2012/06/gadts.html
  12. http://www.reddit.com/r/haskell/comments/v5ewa/gadts/
  13. 

Re: [Haskell-cafe] ANNOUNCE : Leksah 0.12.1.2 (fixes some metadata issues)

2012-06-20 Thread Hilco Wijbenga
On 20 June 2012 18:32, Albert Y. C. Lai tre...@vex.net wrote:
 On 12-06-20 07:59 PM, Hilco Wijbenga wrote:

 hilco@centaur ~ ~$ rm -rf .cabal/

 I am not sure why you start with this.

 If you do this for a clean start, see my
 http://www.vex.net/~trebla/haskell/sicp.xhtml#remove
 for why it is not a clean start.

:-) Thank you for pointing that out. My purpose was indeed to start
over. I've also removed .ghc.

 ... lots of output ...

 I think that is the informative part.

Yes, I suppose so. :-) In my feeble defence: initially there were no
errors. It wasn't until I tried --force-reinstalls that there was an
error reported (gtk2hsC2hs was not able to run). Even this error,
however, was well hidden. No different font, no different colour, no
ASCII art drawing attention to it, nothing. So I missed it the first
two times. If I had noticed it I would have known to include
.cabal/bin in my PATH (it's in the error message).

Cabal doesn't seem to believe in fail early, fail loudly? :-)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [Haskell] ANNOUNCE: set-monad

2012-06-20 Thread Dan Burton
Hi George,

I didn't have access to my computer over the weekend, so I apologize for
not actually running the examples I provided. I was simply projecting what
I thought could reasonably be assumed about the behavior of a Set.
Data.Set.Monad's departure from those assumptions is a double-edged sword,
and so I'd just like to clarify a couple things.

Regarding antisymmetry, if I also define

instance Ord Foo where
  (==) = (==) `on` a

then would that count as satisfying the law?

In any event, I find it an amusing coincidence that Data.Set.Monoid does
essentially the same thing as Foo: it retains some extra information, and
provides an Eq instance that asserts equality modulo dropping the extra
information.

So I have a question and a concern. Loading this file into ghci:
hpaste.org/70245

ghci foo1 == foosTransform1
True
ghci foo2 == foosTransform2
False

given x == y, where x and y are Sets, we cannot guarantee that fmap f x ==
fmap f y, due to the extra information retained for the sake of obeying
functor laws.

My question is this: how *does* the library manage to obey functor laws?

My concern is this: the aforementioned behavior should be clearly
documented in the haddocks. Presumably, people will not know about the
extra information being retained. The following, out of context (where most
debugging happens), could be quite confusing:

ghci foosTransform1
fromList [Foo {a = 1, b = 4}]
ghci fmap restoreA foosTransform1
fromList [Foo {a = 1, b = 1},Foo {a = 2, b = 2},Foo {a = 3, b = 3},Foo {a =
4, b = 4}]

The data seems to pop out of nowhere. Even if Ord instances like the one
for Foo shouldn't exist, they almost certainly will anyways, because the
Haskell type system doesn't prevent them. Users of the library should be
informed accordingly.

Dan Burton
801-513-1596


On Mon, Jun 18, 2012 at 2:40 PM, George Giorgidze giorgi...@gmail.comwrote:

 Hi Dan,

 Thanks for your feedback and your question regarding the functor laws.

 Please try your example in GHCi and/or evaluate it by hand. The
 library does not violate the functor laws.

 I committed quick check properties for functor laws, as well as, laws
 for other type classes to the repo. You can give it a try. It is also
 possible, with a little bit of effort, to prove those properties by
 hand.

 Speaking of laws, BTW, your contrived Ord instance violates one of the
 Ord laws. The documentation for Ord says that: The Ord class is used
 for totally ordered datatypes. Your definition violates the
 antisymmetry law [1]:

 If a = b and b = a then a == b

 by reporting two elements that are not equal as equal.

 Cheers, George

 [1] http://en.wikipedia.org/wiki/Totally_ordered

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe