Re: [Haskell-cafe] ghc/dph

2010-12-15 Thread Roman Leshchinskiy
On 14/12/2010, at 13:35, Johannes Waldmann wrote:

 I want to use dph (data parallel haskell) for a presentation.
 (Nothing fancy, just compile and run some demos.)
 What ghc version should I use and where do I get it?

That's a tricky question. We are currently working on getting DPH to work 
properly with GHC 7 but we aren't quite done yet. You might want to try 7.0.1 + 
the DPH sources from the darcs repo.

 I read the advice use HEAD but when I build
 from the 7.1.20101213 source snapshot,
 dph is not installed (should it be?)

Nowadays, you have to install DPH separately which isn't easy since we haven't 
released the packages yet. In any case, DPH doesn't work with the current HEAD 
at all because I haven't adapted it to the new superclass story yet.

Roman



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


Re: [Haskell-cafe] Functor = Applicative = Monad

2010-12-15 Thread Max Bolingbroke
3, John Smith volderm...@hotmail.com wrote:
 I would like to formally propose that Monad become a subclass of
 Applicative

I'm not in favour of this change because of the code breakage issue.

However, I think that an acceptable plan (mentioned elsewhere on the
list, but doesn't seem to have had any subsequent discussion) would be
to introduce a GHC warning for such cases:

Warning: you are declaring a Monad instance for MyMonad without a
corresponding Applicative instance. This will be an error in GHC 7.2

Then in 7.2 you can remove the warning and change the class hierarchy.

(Substitute 7.4 for 7.2 if you think we need more time for library
authors to update, or if you add the warning only to the 7.2 series).

Cheers,
Max

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


[Haskell-cafe] Behaviour of System.Directory.getModificationTime

2010-12-15 Thread Arnaud Bailly
Hello,
I am writing  a program which scans a bunch of directories to detect
changes (added, modified, deleted files).
To detect modification, I would like to use getModification, doing
something like the following:

-- |Stores last modified timestamp of the file
-- Yes, I come from Java...
type HashMap = M.Map FilePath ClockTime

data (Show a, Eq a) = Edit a = Mod a
  | Add a
  | Del a
  deriving (Eq,Show)

checkChanges :: [String] - HashMap - IO ([Edit FilePath], HashMap)
checkChanges [fs] m = do
addedFilesList - lsRecursive fs
timestamps - mapM getModificationTime addedFilesList
let allts = zip addedFilesList timestamps
let ret   = (findDeletedFiles allts.updateScannedFiles allts) ([],m)
return ret

-- | Returns an updated map and a list of modified/added/deleted files
updateScannedFiles :: [(FilePath,ClockTime)] - ([Edit FilePath],
HashMap) - ([Edit FilePath], HashMap)
updateScannedFiles []r   = r
updateScannedFiles ((path,ts):files) (updates,m) =
  case M.lookup path m of
Nothing  - updateScannedFiles files ((Add path:updates), M.insert
path ts m)
Just ts' - if ts'  ts then
  updateScannedFiles files ((Mod path:updates),
M.adjust (const ts) path m)
else
  updateScannedFiles files (updates, m)

-- omitting findDeletedFiles which is obvious and works

I got the following test case that fails:

recursively marks changed files as modified `for`
do complexFileSetup   -- create a small FS tree with 3 files
   root - tempDir
   state - checkChanges [root] M.empty
   writeFile (root / subdir / cFile.txt)  this is another
toast
   checkChanges [root] (snd state)
= (\r - assertEqual there should be 1 changed file in 3 files
1 ((length.modified.fst) r)),

In words: the getModificationTime of the overwritten file appears
identical before and after the write. What am I doing wrong ?
BTW, I checked the content of the file which has been correctly updated.

Thanks for your help
Arnaud

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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread John Smith

On 15/12/2010 04:01, Jonathan Geddes wrote:

Fail can't just be removed. That would just break too much code. For
example, I find myself writing code like the following:


[a,b,c]- Just someList


in place of


let [a,b,c] = someList


so that pattern match failure is lifted into the maybe monad (as
long as I'm already in the maybe monad).

I would like to see a MonadFail class, with one method 'fail', such
that it is a compile-time error to try 'failable' pattern matches in a
monad that is not an instance of MonadFail.

--Jonathan


Perhaps pattern match failures in a MonadPlus should bind to mzero - I believe that this is what your example and 
similar wish to achieve.


I've updated http://haskell.org/haskellwiki/Functor-Applicative-Monad_Proposal to mention this. Does anyone know why 
fail and Pointed (in the paragraph This would eliminate...) aren't beginning a new paragraph? They are both preceded 
by a blank line in the wiki source.



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


Re: [Haskell-cafe] lhs2tex build failure

2010-12-15 Thread Andres Loeh
The latest version on GitHub should fix the problem. I'll make a new
release soon.

https://github.com/kosmikus/lhs2tex

Cheers,
  Andres

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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Tillmann Rendel

Hi John,

John Smith wrote:

Perhaps pattern match failures in a MonadPlus should bind to mzero - I
believe that this is what your example and similar wish to achieve.


You updated the proposal to say:

a failed pattern match should error in the same way as is does for pure code, 
while in
MonadPlus, the current behaviour could be maintained with mzero


Can you be more specific as to how that would interact with polymorphism 
and type inference? What does it mean to be in MonadPlus? How does the 
compiler know?


For example, what would be the static types and dynamic semantics of the 
following expressions:


 1. \a - do {Just x - return (Just a); return x}

 2. do {Just x - return Nothing; return x}

 3. \a - do {Just x - a; return x}

 4. \a b - do {(x, _) - return (a, b); return x}

 5. \a - do {(x, _) - return a; return x}

Tillmann

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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Lennart Augustsson
Any refutable pattern match in do would force MonadFail (or MonadPlus if you
prefer).  So
1.  (MonadFail m) = a - m a,   \ a - return a
2.  (MonadFail m) = m a,   mfail ...
3.  (MonadFail m) = Maybe a - m a,   \ a - case a of Nothing - mfail
...; Just x - return x
4.  (Monad m) = a - b - m a,   \ a b - return a
5.  (Monad m) = (a, b) - m a,   \ (a, b) - return a

As far as type inference and desugaring goes, it seems very little would
have to be changed in an implementation.

  -- Lennart

2010/12/15 Tillmann Rendel ren...@informatik.uni-marburg.de

 Hi John,


 John Smith wrote:

 Perhaps pattern match failures in a MonadPlus should bind to mzero - I
 believe that this is what your example and similar wish to achieve.


 You updated the proposal to say:

 a failed pattern match should error in the same way as is does for pure
 code, while in
 MonadPlus, the current behaviour could be maintained with mzero


 Can you be more specific as to how that would interact with polymorphism
 and type inference? What does it mean to be in MonadPlus? How does the
 compiler know?

 For example, what would be the static types and dynamic semantics of the
 following expressions:

  1. \a - do {Just x - return (Just a); return x}

  2. do {Just x - return Nothing; return x}

  3. \a - do {Just x - a; return x}

  4. \a b - do {(x, _) - return (a, b); return x}

  5. \a - do {(x, _) - return a; return x}

Tillmann


 ___
 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] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Tillmann Rendel

John Smith proposed:

a failed pattern match should error in the same way as is does for
pure code, while in MonadPlus, the current behaviour could be
maintained with mzero


Lennart Augustsson wrote:

Any refutable pattern match in do would force MonadFail (or MonadPlus
if you prefer).


I guess that would work out, but I think John proposed something else.

  Tillmann

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


Re: [Haskell-cafe] ghc/dph

2010-12-15 Thread J . Waldmann

 It looks like your best bet may be to use GHC 6.12 

but then the question remains: what version exactly,
and where do I get it.

it seems I need something that was HEAD at the time (6.13.* ?)
but I don't find older snapshot releases on http://haskell.org/ghc/dist/

Thanks - J.W.



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


[Haskell-cafe] par / pseq example

2010-12-15 Thread J . Waldmann
I was trying to find an easy example for par/pseq,
and I finally used plain mergesort ( on Prelude.[] )

and I observed that it is best to give +RTS -A1G (or more)
such that there are only very few garbage collections.
This roughly cuts execution time in half 
(from +RTS -N1 to -N4, on an i7 CPU)
which is nice for a demonstration.

The following is the very straightforward program that I use.
Is it OK? I'm not asking for a faster sort algorithm,
but whether par/pseq is used correctly/idiomatically in this program
(so that students don't get a wrong impression).

msort [] = [] ; msort [x] = [x]
msort xs = 
let ( here, there ) = splitAt ( div ( length xs ) 2 ) xs
mshere = msort here
msthere = msort there
inlast mshere 
`par` last msthere
`pseq` merge mshere msthere 

merge [] ys = ys ; merge xs [] = xs
merge (x:xs) (y:ys) = 
if x  y then x : merge xs (y:ys)
 else y : merge (x:xs) ys

Thanks - J.W.


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


Re: [Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-15 Thread Gregory Collins
On Wed, Dec 15, 2010 at 12:20 AM, Antoine Latter aslat...@gmail.com wrote:
 Maybe I'm missing something - but shouldn't the code listening on the
 Handle already be in it's own thread?

 The general recipe is:

 1. Bind a socket to port
 2. Call Network.accept, then take the resultant Handle, call forkIO
 with the TLS actions and the resultant handle. Go back to 1.

Yes, for 99% of users this is the right thing to do. Note that Haskell
threads are lightweight green threads and that under the hood you are
getting efficient async networking using epoll() or kqueue() on
Linux/OSX.

G
-- 
Gregory Collins g...@gregorycollins.net

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


[Haskell-cafe] installing gtk2

2010-12-15 Thread Max Buchholz


Hi everybody,I've got problems installing gtk2 onMac OS X 10.6.5.Here's the error message I receive when I try to install gtk2:
bli-dor-nb01:~ max-buchholz$ sudo port install gvfs
Password:
--- Computing dependencies for gvfs
--- Building gvfs
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for gvfs is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gvfs/main.log
Error: Status 1 encountered during processing.
To report a bug, see http://guide.macports.org/#project.tickets
bli-dor-nb01:~ max-buchholz$ sudo port install gtk2hs
--- Computing dependencies for gtk2hs
--- Dependencies to be installed: gvfs
--- Building gvfs
Error: Target org.macports.build returned: shell command failed (see log for details)
Error: Failed to install gvfs
Log for gvfs is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gvfs/main.log
Error: The following dependencies were not installed: gvfs
Error: Status 1 encountered during processing.
To report a bug, see http://guide.macports.org/#project.tickets
bli-dor-nb01:~ max-buchholzmce_markernbsp;
bli-dor-nb01:~ max-buchholz$ sudo port install gtk2hs--- Computing dependencies for gtk2hs--- Dependencies to be installed: gvfs--- Building gvfsError: Target org.macports.build returned: shell command failed (see log for details)Error: Failed to install gvfsLog for gvfs is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gvfs/main.logError: The following dependencies were not installed: gvfsError: Status 1 encountered during processing.To report a bug, see http://guide.macports.org/#project.ticketsbli-dor-nb01:~ max-buchholzmce_markernbsp;Now I tried to install gvfs and receive the following:bli-dor-nb01:~ max-buchholz$ sudo port install gvfsPassword:--- Computing dependencies for gvfs--- Building gvfsError: Target org.macports.build returned: shell command failed (see log for details)Log for gvfs is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gvfs/main.logError: Status 1 encountered during processing.To report a bug, see http://guide.macports.org/#project.ticketsI hope you could help me!RegardsMax


GRATIS! Movie-FLAT mit ber 300 Videos. Jetzt freischalten unter http://movieflat.web.de


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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread John Smith

On 15/12/2010 11:39, Lennart Augustsson wrote:

Any refutable pattern match in do would force MonadFail (or MonadPlus if you 
prefer).  So
1.  (MonadFail m) = a - m a,   \ a - return a
2.  (MonadFail m) = m a,   mfail ...
3.  (MonadFail m) = Maybe a - m a,   \ a - case a of Nothing - mfail ...; 
Just x - return x
4.  (Monad m) = a - b - m a,   \ a b - return a
5.  (Monad m) = (a, b) - m a,   \ (a, b) - return a

As far as type inference and desugaring goes, it seems very little would have 
to be changed in an implementation.


Is there a need for a MonadFail, as distinct from mzero? fail always seems to be defined as error in ordinary monads, 
and as mzero in MonadPlus (or left at the default error).



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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Lennart Augustsson
Yes, I think there should be a MonadFail distinct from MonadPlus.
Some types, like IO, are not in MonadPlus, but have a special implementation
of the fail method.

Personally, I think fail should just be removed, but that would break
existing code.
The fail method was introduced for the wrong reasons (better error messages
was the excuse).

  -- Lennart

On Wed, Dec 15, 2010 at 11:51 AM, John Smith volderm...@hotmail.com wrote:

 On 15/12/2010 11:39, Lennart Augustsson wrote:

 Any refutable pattern match in do would force MonadFail (or MonadPlus if
 you prefer).  So
 1.  (MonadFail m) = a - m a,   \ a - return a
 2.  (MonadFail m) = m a,   mfail ...
 3.  (MonadFail m) = Maybe a - m a,   \ a - case a of Nothing - mfail
 ...; Just x - return x
 4.  (Monad m) = a - b - m a,   \ a b - return a
 5.  (Monad m) = (a, b) - m a,   \ (a, b) - return a

 As far as type inference and desugaring goes, it seems very little would
 have to be changed in an implementation.


 Is there a need for a MonadFail, as distinct from mzero? fail always seems
 to be defined as error in ordinary monads, and as mzero in MonadPlus (or
 left at the default error).



 ___
 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] GHC 7.0.1 developer challenges

2010-12-15 Thread Simon Marlow

On 13/12/2010 15:45, Peter Simons wrote:

Hi Mathieu,

Why don't you use ulimit for this job?
  
$ ulimit -m 32M; ./cpsa

yes, I was thinking the same thing. Relying exclusively on GHC's ability to
limit run-time memory consumption feels like an odd choice for this task.
It's nice that this feature exists in GHC, but it's inherently non-portable
and outside of the scope of the language. There really ought to be a better
way to catch an infinite loop that this.


ulimit is a good way to catch an infinite loop.  But it's not a good way 
to tell GHC how much memory you want to use - if GHC knows the memory 
limit, then it can make much more intelligent decisions about how to 
manage memory.  The -M flag causes the GC algorithm to switch from 
copying (fast but hungry) to compaction (slow but frugal) as the limit 
approaches.


Cheers,
Simon

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


[Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
Hello Café,

I was wondering if using infinite lists was a viable and efficient solution
in haskell programs (I mean not simple prototypes) :
I was considering using them to model agents in a hierarchical multi-agent
application for school.
A list would representate the state of an agent at a step of the program.

Let's say we have two simple agents, one multiplying its input by 2 and the
other dividing it by 4 :


agent1 = fmap (*2)
agent2 = fmap (/4)

allValues = xs where
  ys = agent1 xs
  xs = 100:agen2 ys

main = do
   mapM_ print $ take 100 allValues


Of course, in a real program, an agent would rather take a list of multiple
agents (i.e. a list of lists) in input, so that its ouput could depend on
what several agents feed him.

Some could state what I'm trying to do is FRP, and I agree. But it remains a
simple goal so I'd like to keep the program simple, and not go into the
whole complexity of a FRP framework (and I'm working with a non-haskeller).
For instance, with my solution, I cannot dynamically connect or disconnect
agents during the runtime, but I'll will not need to do that in my program.
Besides, I'd like to try to implement this myself, not use an already
existing framework.

So is it viable or would the use of multiple infinite lists kill the
performances?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Dimitry Golubovsky
Hi,

In MSIE6, hask tags are rendered like this (from the Monad_Transformers page):

transformers: provides the classes
MonadTrans
and
MonadIO
, as well as concrete monad transformers such as
StateT

... etc.

The Wiki source:

[http://hackage.haskell.org/package/transformers transformers]:
provides the classes haskMonadTrans/hask and haskMonadIO/hask,
as well as concrete monad transformers such as haskStateT/hask.

HTML (a small piece of it):

provides the classes div class=inline-codediv dir=ltr
style=text-align: left;div class=source-haskell
style=font-family: monospace;MonadTrans/div/div/div

Words MonadTrans, MonadIO, StateT etc are enclosed in hask tags.
They show up in monospace, each starting a new line. Is this only
MSIE6, or this is how it is supposed to render?

Thanks.

PS I am not attaching a screenshot to the mailing list; if anyone
needs to see it I'll send via personal e-mail.

-- 
Dimitry Golubovsky

Anywhere on the Web

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Ross Paterson
On Wed, Dec 15, 2010 at 09:01:49AM -0500, Dimitry Golubovsky wrote:
 HTML (a small piece of it):
 
 provides the classes div class=inline-codediv dir=ltr
 style=text-align: left;div class=source-haskell
 style=font-family: monospace;MonadTrans/div/div/div
 
 Words MonadTrans, MonadIO, StateT etc are enclosed in hask tags.
 They show up in monospace, each starting a new line. Is this only
 MSIE6, or this is how it is supposed to render?

They're inline in FireFox.  That text-align: seems unnecessary.

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


Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread John Lato

 From: Permjacov Evgeniy permea...@gmail.com

 current links

 https://github.com/permeakra/Rank2Iteratee
 https://github.com/permeakra/PassiveIteratee

 The main difference from 'original' iteratees I read about is that both
 do not use 'chunks' and pass data one-by-one. So, what I wrote may be
 slower, but should be easier to maintain and more transparent for ghc
 optimising facilities. I wanted as clean and simple code as possible,
 but it is still very, very messy at some places and I want it cleaner.
 Any suggestions? I also want to check, how good ghc does its work with
 this messy modules. They may become interesting benchmarks.


Have you tried comparing it to either iteratee or enumerator (which had
mostly comparable performance last time I checked, with a slight edge to
iteratee)?  Or to Oleg's library?  Try writing test cases, a simple
byte-counting application, or similar, so you can compare the performance
with the other versions.  Both enumerator and iteratee include demo programs
that you could use as a starting point.

I agree that iteratees which work on a per-element level are very clean and
should be amenable to optimization by GHC.  It also shows a very clear
relationship with stream-fusion techniques.  Unfortunately when I last tried
it I couldn't get acceptable performance.  I was using ghc-6.12.1 IIRC, so
it could be different now.

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Henk-Jan van Tuyl
On Wed, 15 Dec 2010 15:01:49 +0100, Dimitry Golubovsky  
golubov...@gmail.com wrote:



Hi,

In MSIE6, hask tags are rendered like this (from the  
Monad_Transformers page):


transformers: provides the classes
MonadTrans
and
MonadIO
, as well as concrete monad transformers such as
StateT


MSIE8 (with compatibility updates) and Opera on my system display the page  
correctly.


Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--

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


Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread Peter Simons
Hi John,

  I think the previous responder was asserting the 32M limit, not you.

I believe the previous poster suggested that you use ulimit to provide a
hard upper bound for run-time memory use. That 32M figure seemed to be made
up out of thin air just as an example to illustrate the syntax of the ulimit
command. I don't have the impression that it was meant be any significant.


  [My program allows] users to set a step count bound, after which the
  program aborts. But guess what users do. They keep increasing the step
  count bound to see if just a few more steps will allow termination on
  their problem. Of course, some end up setting the bound so high, that
  thrashing occurs.

I see. I must have misunderstood the situation. From your original posting,
I got the impression that the program would depend on an externally enforced
memory limit just to terminate at all!


  So for implementations of undecidable algorithms, you really need an
  intelligent memory bound on the GHC runtime.

Well, some sort of externally enforced memory limit is useful, yes, but you
don't strictly need that functionality in GHC. You can just as well use the
operating system to enforce that limit, i.e. by means of 'ulimit'.

Take care,
Peter


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


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 02:52:11PM +0100, Yves Parès wrote:
 Hello Café,
 
 So is it viable or would the use of multiple infinite lists kill the
 performances?

Sounds perfectly reasonable to me.  I don't see any reason why using
multiple infinite lists would have anything to do with the performance
of your program -- unless you do something silly like try to compute
their length. =)

-Brent

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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote:
 On 15/12/2010 11:39, Lennart Augustsson wrote:
  Any refutable pattern match in do would force MonadFail (or MonadPlus if 
  you prefer).  So
  1.  (MonadFail m) = a - m a,   \ a - return a
  2.  (MonadFail m) = m a,   mfail ...
  3.  (MonadFail m) = Maybe a - m a,   \ a - case a of Nothing - mfail 
  ...; Just x - return x
  4.  (Monad m) = a - b - m a,   \ a b - return a
  5.  (Monad m) = (a, b) - m a,   \ (a, b) - return a
 
  As far as type inference and desugaring goes, it seems very little would 
  have to be changed in an implementation.
 
 Is there a need for a MonadFail, as distinct from mzero? fail always seems to 
 be defined as error in ordinary monads, 
 and as mzero in MonadPlus (or left at the default error).

Not all types can implement mplus to begin with even if they can have
'zero' type. For example technically Maybe breaks the laws while still
having useful fail:

(guard . even) = (Just 1 | Just 2)
(guard . even) = Just 1
guard (even 1)
guard False
Nothing
/=
Just ()
Nothing | Just ()
guard False | guard True
(guard (even 1)) | (guard (even 2))
((guard . even) = Just 1) | ((guard . even) = Just 2)

Regards



signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
 try to compute their length

Yes ^^, that's silly.

 I don't see any reason why using multiple infinite lists would have
anything to do with the performance

That's comforting. Well, it seems to be a very simple, haskellish and
elegant solution, so basic pragmatism -- with an slice of pessimism -- tells
it was too good too be true ^^.

2010/12/15 Brent Yorgey byor...@seas.upenn.edu

 On Wed, Dec 15, 2010 at 02:52:11PM +0100, Yves Parès wrote:
  Hello Café,
 
  So is it viable or would the use of multiple infinite lists kill the
  performances?

 Sounds perfectly reasonable to me.  I don't see any reason why using
 multiple infinite lists would have anything to do with the performance
 of your program -- unless you do something silly like try to compute
 their length. =)

 -Brent

 ___
 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] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 09:01 -0500, Dimitry Golubovsky wrote:
 Hi,
 
 In MSIE6, hask tags are rendered like this (from the Monad_Transformers 
 page):
 
 transformers: provides the classes
 MonadTrans
 and
 MonadIO
 , as well as concrete monad transformers such as
 StateT
 
 ... etc.
 
 The Wiki source:
 
 [http://hackage.haskell.org/package/transformers transformers]:
 provides the classes haskMonadTrans/hask and haskMonadIO/hask,
 as well as concrete monad transformers such as haskStateT/hask.
 
 HTML (a small piece of it):
 
 provides the classes div class=inline-codediv dir=ltr
 style=text-align: left;div class=source-haskell
 style=font-family: monospace;MonadTrans/div/div/div
 
 Words MonadTrans, MonadIO, StateT etc are enclosed in hask tags.
 They show up in monospace, each starting a new line. Is this only
 MSIE6, or this is how it is supposed to render?
 
 Thanks.
 
 PS I am not attaching a screenshot to the mailing list; if anyone
 needs to see it I'll send via personal e-mail.
 

In epiphany (webkit) it displays OK. 

You can always test on pages like
http://browsershots.org/http://haskell.org/haskellwiki/Monad_Transformers

In general I'd say that MSIE should be avoided and updated to newer
version like 7 or 8 (according to wikipedia they should be avaible for
Windows XP - or at least they were available when Windows XP was
supported) - IE6 have technology from 2001. I understand however that it
may be outside your control (maybe portable Fx would be solution?)

Regards

PS. BTW - does anyone have statistics on browser share on Haskell site?
According to Wikipedia IE6 have still around 16% market share but I
guess it is lower here.


signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 06:25:30PM +0100, Maciej Piechotka wrote:
 On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote:
  On 15/12/2010 11:39, Lennart Augustsson wrote:
   Any refutable pattern match in do would force MonadFail (or MonadPlus if 
   you prefer).  So
   1.  (MonadFail m) = a - m a,   \ a - return a
   2.  (MonadFail m) = m a,   mfail ...
   3.  (MonadFail m) = Maybe a - m a,   \ a - case a of Nothing - mfail 
   ...; Just x - return x
   4.  (Monad m) = a - b - m a,   \ a b - return a
   5.  (Monad m) = (a, b) - m a,   \ (a, b) - return a
  
   As far as type inference and desugaring goes, it seems very little would 
   have to be changed in an implementation.
  
  Is there a need for a MonadFail, as distinct from mzero? fail always seems 
  to be defined as error in ordinary monads, 
  and as mzero in MonadPlus (or left at the default error).
 
 Not all types can implement mplus to begin with even if they can have
 'zero' type. For example technically Maybe breaks the laws while still
 having useful fail:
 
 (guard . even) = (Just 1 | Just 2)
 (guard . even) = Just 1
 guard (even 1)
 guard False
 Nothing
 /=
 Just ()
 Nothing | Just ()
 guard False | guard True
 (guard (even 1)) | (guard (even 2))
 ((guard . even) = Just 1) | ((guard . even) = Just 2)

But that depends on what laws you choose for MonadPlus.  See
http://www.haskell.org/haskellwiki/MonadPlus .

-Brent

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Neil Mitchell
Hi

 In general I'd say that MSIE should be avoided and updated to newer
 version like 7 or 8 (according to wikipedia they should be avaible for
 Windows XP - or at least they were available when Windows XP was
 supported) - IE6 have technology from 2001. I understand however that it
 may be outside your control (maybe portable Fx would be solution?)

I strongly agree that MSIE 6 should be avoided, but for many company
networks it's required. The big problem isn't that 16% (or whatever)
of people use it, it's that while technical people will use a modern
and powerful browser, many non-technical managers will just use the
default settings/systems, and it gives a bad impression if when told
that Haskell is a great tool a manager looks up haskell.org and sees
a messy splat.

For reference, the new Haddock style also gives various rendering
issues in IE6. I reported these a while back (to Mark) but never got
any response.

Thanks, Neil

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


Re: [Haskell-cafe] [Haskell] Functor = Applicative = Monad

2010-12-15 Thread Conor McBride


On 15 Dec 2010, at 17:48, Brent Yorgey wrote:


On Wed, Dec 15, 2010 at 06:25:30PM +0100, Maciej Piechotka wrote:

On Wed, 2010-12-15 at 13:51 +0200, John Smith wrote:

On 15/12/2010 11:39, Lennart Augustsson wrote:
Any refutable pattern match in do would force MonadFail (or  
MonadPlus if you prefer).  So


[..]



As far as type inference and desugaring goes, it seems very  
little would have to be changed in an implementation.


Is there a need for a MonadFail, as distinct from mzero? fail  
always seems to be defined as error in ordinary monads,

and as mzero in MonadPlus (or left at the default error).


Not all types can implement mplus to begin with even if they can have
'zero' type. For example technically Maybe breaks the laws while  
still

having useful fail:


[..]



But that depends on what laws you choose for MonadPlus.  See
http://www.haskell.org/haskellwiki/MonadPlus .


What has any of this to do with monads?

Cheers

Conor


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


Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread Permjacov Evgeniy
On 12/15/2010 05:48 PM, John Lato wrote:

 From: Permjacov Evgeniy permea...@gmail.com
 mailto:permea...@gmail.com

 current links

 https://github.com/permeakra/Rank2Iteratee
 https://github.com/permeakra/PassiveIteratee

 The main difference from 'original' iteratees I read about is that
 both
 do not use 'chunks' and pass data one-by-one. So, what I wrote may be
 slower, but should be easier to maintain and more transparent for ghc
 optimising facilities. I wanted as clean and simple code as possible,
 but it is still very, very messy at some places and I want it cleaner.
 Any suggestions? I also want to check, how good ghc does its work with
 this messy modules. They may become interesting benchmarks.


 Have you tried comparing it to either iteratee or enumerator (which
 had mostly comparable performance last time I checked, with a slight
 edge to iteratee)?  Or to Oleg's library?  Try writing test cases, a
 simple byte-counting application, or similar, so you can compare the
 performance with the other versions.  Both enumerator and iteratee
 include demo programs that you could use as a starting point.
I wrote a simple counter (attached,works for both variants of package),
that literally counts bytes of given value in input. I got three-time
slower result then with lazy io ( 0_o) with rank2types variant and
six-seven time slower result with no CPS-version.  Looks like ghc is
really good with list fusion... I'm still reading tutorial from iteratee
package, so I have not compared with it yet. An equivalend lazy io
programm attached. Can someone give an advice how to improve performance?

 I agree that iteratees which work on a per-element level are very
 clean and should be amenable to optimization by GHC.  It also shows a
 very clear relationship with stream-fusion techniques.  Unfortunately
 when I last tried it I couldn't get acceptable performance.  I was
 using ghc-6.12.1 IIRC, so it could be different now.

 John

module Main where
import Data.List
import System.IO
import System.Environment

main = do
 (fn:ls:_) - getArgs
 flip mapM_ ls $ \ec - do
 	fc - readFile fn
	let v = foldl' (\n cc - if ec == cc then (n+1) else n ) 0 fc
	putStrLn $ for character  ++ show ec ++  count is  ++ show v
 putStrLn $ all done

module Main where
import Data.Char
import Data.Iteration.Types
import Data.Iteration.IO.File
import Data.Word
import System.Environment

main = do
 fn:cl:_ - getArgs
 flip mapM_ cl $ 
 	\c - 	do
		let ccc n = do
			cb - nextI (putStrLn $ count for char  ++ show c ++  is  ++ show n) (putStrLn . show)
			n `seq` if (cb == fromIntegral ( ord c ) ) then ccc (n + 1) else ccc n
		flip runIterator (fileE fn) $ mkI $ ccc 0
 	


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


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Edward Z. Yang
It sounds like a good fit for your problem as stated.  One thing to note
is that Haskell will give you great abstractions for very strong amounts
of code, as long as what you want to do is a good fit for the abstraction.
Haskell makes it quite hard to fit a square peg into a round hole, so
if one day you decide you need an agent that generates random numbers,
you can either do dangerous stuff with unsafeInterleaveIO or you'll need
to find a more flexible abstraction.

Cheers,
Edward

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Maciej Piechotka
On Wed, 2010-12-15 at 17:56 +, Neil Mitchell wrote:
 Hi
 
  In general I'd say that MSIE should be avoided and updated to newer
  version like 7 or 8 (according to wikipedia they should be avaible for
  Windows XP - or at least they were available when Windows XP was
  supported) - IE6 have technology from 2001. I understand however that it
  may be outside your control (maybe portable Fx would be solution?)
 
 I strongly agree that MSIE 6 should be avoided, but for many company
 networks it's required. The big problem isn't that 16% (or whatever)
 of people use it, it's that while technical people will use a modern
 and powerful browser, many non-technical managers will just use the
 default settings/systems, and it gives a bad impression if when told
 that Haskell is a great tool a manager looks up haskell.org and sees
 a messy splat.
 
 For reference, the new Haddock style also gives various rendering
 issues in IE6. I reported these a while back (to Mark) but never got
 any response.
 
 Thanks, Neil

I cannot speak for anyone but from what I remember supporting MSIE is
neither trivial nor fan. If you happen to use newer version of IE or
even different operating system (if I remember correctly most of Haskell
users use GNU/Linux) then you have bad luck - you have to use other
tools like virtual machines etc. - only to find out that you have not
been visited once by IE 6.

I'm not sure how many changes are going to be commited into haddock
backend/themes but once ported it would need to be maintained. 

Regards



signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Yves Parès
 if one day you decide you need an agent that generates random numbers

I could say that my agents now run in a certain monad, I just would have to
transform my basic agents to :
agent1 = liftM . fmap (*2)

(or even agen1 = fmap . fmap (*2), however it is less readable IMO)


Thanks for your comments.

2010/12/15 Edward Z. Yang ezy...@mit.edu

 It sounds like a good fit for your problem as stated.  One thing to note
 is that Haskell will give you great abstractions for very strong amounts
 of code, as long as what you want to do is a good fit for the abstraction.
 Haskell makes it quite hard to fit a square peg into a round hole, so
 if one day you decide you need an agent that generates random numbers,
 you can either do dangerous stuff with unsafeInterleaveIO or you'll need
 to find a more flexible abstraction.

 Cheers,
 Edward

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


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Brent Yorgey
On Wed, Dec 15, 2010 at 06:38:04PM +0100, Yves Parès wrote:
  try to compute their length
 
 Yes ^^, that's silly.
 
  I don't see any reason why using multiple infinite lists would have
 anything to do with the performance
 
 That's comforting. Well, it seems to be a very simple, haskellish and
 elegant solution, so basic pragmatism -- with an slice of pessimism -- tells
 it was too good too be true ^^.

Premature pessimism is the root of all procrastination.

-Brent

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Colin Adams
On 15 December 2010 18:23, Maciej Piechotka uzytkown...@gmail.com wrote:


  For reference, the new Haddock style also gives various rendering
  issues in IE6. I reported these a while back (to Mark) but never got
  any response.
 
  Thanks, Neil

 I cannot speak for anyone but from what I remember supporting MSIE is
 neither trivial nor fan. If you happen to use newer version of IE or
 even different operating system (if I remember correctly most of Haskell
 users use GNU/Linux) then you have bad luck - you have to use other
 tools like virtual machines etc. - only to find out that you have not
 been visited once by IE 6.


And you have to pay for a copy of MS-Windows to run in your VM.
I.e. YOU (read I) have to pay to support someone else's broken software.

So you wouldn't catch me trying to support IE 6 (or anything else).
Standards have a good reason for existing.
-- 
Colin Adams
Preston, Lancashire, ENGLAND
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Infinite lists in real world programs

2010-12-15 Thread Edward Z. Yang
Excerpts from Yves Parès's message of Wed Dec 15 13:28:11 -0500 2010:
  if one day you decide you need an agent that generates random numbers
 
 I could say that my agents now run in a certain monad, I just would have to
 transform my basic agents to :
 agent1 = liftM . fmap (*2)
 
 (or even agen1 = fmap . fmap (*2), however it is less readable IMO)

Yes, it's one of the really great things about Haskell. :-)  But since
implementing functionality takes so much less code in Haskell than
in many other languages, don't be shy to rewrite as necessary.

Edward

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Henk-Jan van Tuyl
On Wed, 15 Dec 2010 18:45:10 +0100, Maciej Piechotka  
uzytkown...@gmail.com wrote:


:

You can always test on pages like
http://browsershots.org/http://haskell.org/haskellwiki/Monad_Transformers

:
:


PS. BTW - does anyone have statistics on browser share on Haskell site?
According to Wikipedia IE6 have still around 16% market share but I
guess it is lower here.



Statistics from A tour of the Haskell Monad functions (on my site),  
after 15.351 pageviews:


Top 15 Browsers

 Browsers   %
 Mozilla 1.975,07%
 Firesomething Add-On   12,06%
 Opera 9.6  3,46%
 Internet Explorer 8.0  2,96%
 Internet Explorer 7.0  1,73%
 Mozilla 1.81,61%
 Internet Explorer 6.0  1,31%
 Firefox 3.00,43%
 General Crawlers   0,39%
 Firefox 2.00,23%
 Konqueror 4.2  0,17%
 Opera 9.0  0,13%
 Opera 9.5  0,07%
 Opera 9.2  0,05%
 Konqueror 3.0  0,05%


Top 10 operating systems

 Operating System   %
 Linux  53,29%
 Windows XP 24,63%
 Windows Vista  9,17%
 Macintosh OS X 8,01%
 Windows 7  2,97%
 Windows 2003   0,67%
 FreeBSD0,56%
 SunOS  0,33%
 Windows 2000   0,29%
 Windows 98 0,04%


Regards,
Henk-Jan van Tuyl


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Thomas Schilling
Yes, the current syntax highligthing plugin (SyntaxHighlight_GeSHi) is
quite annoying.  It's the version that comes with debian which has the
advantage that it will be updated automatically.  However, it the
surrounding div class=inline-code is my attempt at hacking around
the fact that it doesn't even support inline-markup.  Another issue is
the weird way of trimming white space only on the first line.

I'm now leaning towards writing a new custom plugin, but that means i
have to write (and test) PHP code.  Maybe I find some time over the
holidays.  If anyone else wants to propose another plugin, let me
know.

On 15 December 2010 14:01, Dimitry Golubovsky golubov...@gmail.com wrote:
 Hi,

 In MSIE6, hask tags are rendered like this (from the Monad_Transformers 
 page):

 transformers: provides the classes
 MonadTrans
 and
 MonadIO
 , as well as concrete monad transformers such as
 StateT

 ... etc.

 The Wiki source:

 [http://hackage.haskell.org/package/transformers transformers]:
 provides the classes haskMonadTrans/hask and haskMonadIO/hask,
 as well as concrete monad transformers such as haskStateT/hask.

 HTML (a small piece of it):

 provides the classes div class=inline-codediv dir=ltr
 style=text-align: left;div class=source-haskell
 style=font-family: monospace;MonadTrans/div/div/div

 Words MonadTrans, MonadIO, StateT etc are enclosed in hask tags.
 They show up in monospace, each starting a new line. Is this only
 MSIE6, or this is how it is supposed to render?

 Thanks.

 PS I am not attaching a screenshot to the mailing list; if anyone
 needs to see it I'll send via personal e-mail.

 --
 Dimitry Golubovsky

 Anywhere on the Web

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




-- 
Push the envelope. Watch it bend.

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


Re: [Haskell-cafe] Rendering of hask in new wiki (MSIE6)

2010-12-15 Thread Richard O'Keefe

On 16/12/2010, at 3:31 AM, Ross Paterson wrote:

 On Wed, Dec 15, 2010 at 09:01:49AM -0500, Dimitry Golubovsky wrote:
 HTML (a small piece of it):
 
 provides the classes div class=inline-codediv dir=ltr
 style=text-align: left;div class=source-haskell
 style=font-family: monospace;MonadTrans/div/div/div
 
 Words MonadTrans, MonadIO, StateT etc are enclosed in hask tags.
 They show up in monospace, each starting a new line. Is this only
 MSIE6, or this is how it is supposed to render?
 
 They're inline in FireFox.  That text-align: seems unnecessary.

One normally expects div elements to be *block-level*; that's
what div is for.  Inline stuff should use span, that's what
span is for.


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


Re: [Haskell-cafe] Iteratee-like

2010-12-15 Thread Permjacov Evgeniy
On 12/15/2010 05:48 PM, John Lato wrote:

 From: Permjacov Evgeniy permea...@gmail.com
 mailto:permea...@gmail.com

 current links

 https://github.com/permeakra/Rank2Iteratee
 https://github.com/permeakra/PassiveIteratee

 The main difference from 'original' iteratees I read about is that
 both
 do not use 'chunks' and pass data one-by-one. So, what I wrote may be
 slower, but should be easier to maintain and more transparent for ghc
 optimising facilities. I wanted as clean and simple code as possible,
 but it is still very, very messy at some places and I want it cleaner.
 Any suggestions? I also want to check, how good ghc does its work with
 this messy modules. They may become interesting benchmarks.


 Have you tried comparing it to either iteratee or enumerator (which
 had mostly comparable performance last time I checked, with a slight
 edge to iteratee)?  Or to Oleg's library?  Try writing test cases, a
 simple byte-counting application, or similar, so you can compare the
 performance with the other versions.  Both enumerator and iteratee
 include demo programs that you could use as a starting point.
Ok, I tested with ByteString chunks and got roughly the same performance
(less then 5 % difference) as with Data.Iteratee (as expected, as it is
not a monad a bottlenec when using chunks). However, with Word8' streams
I slows down to point six times slower then lazy IO. this is still may
be acceptable if IO actions has to be performed while making nontrivial
list fusions, but in general it is fail.

Well, ghc has another complicated case for compiler optimisation tests.

CPS-style with rank2 types provides boost to performance, but when using
chunks it is insignificant, so haskell-98 version of iteratees may be
used with no worries.

 I agree that iteratees which work on a per-element level are very
 clean and should be amenable to optimization by GHC.  It also shows a
 very clear relationship with stream-fusion techniques.  Unfortunately
 when I last tried it I couldn't get acceptable performance.  I was
 using ghc-6.12.1 IIRC, so it could be different now.

 John

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


Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-15 Thread John D. Ramsdell
On Wed, Dec 15, 2010 at 7:59 AM, Simon Marlow marlo...@gmail.com wrote:

  The -M flag causes the GC algorithm to switch from copying (fast but
 hungry) to compaction (slow but frugal) as the limit approaches.

Ah, so that's what it's doing.  My measurements say that part of the
code is working well.  Of course, my conclusion is based on a tiny
sample size.

John

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


[Haskell-cafe] Gtk 0.12.0, Windows 7, Haskell Platform 2010.2.0.0, build error

2010-12-15 Thread aditya siram
Hi all,
I am having some issues building Gtk2Hs on Windows 7. It completes
compiling the whole thing and then errors out with this message:
Registering gtk-0.12.0...
setup.exe: WARNING: cache is out of date: c:/Program Files/Haskell
Platform/2010.2.0.0\lib\package.conf.d\package.cache
use 'ghc-pkg recache' to fix.
gtk-0.12.0: library-dirs: c:/devel/dist/win32/libpng-1.4.3-1/lib doesn't exist
or isn't a directory (use --force to override)
cabal.exe: Error: some packages failed to install:
gtk-0.12.0 failed during the building phase. The exception was:
ExitFailure 1

I'm not sure why it's looking at
c:/devel/dist/win32/libpng-1.4.3-1/lib and I couldn't find any
reference to this directory in the source tree.

I tried to do a ghc-pkg recache but I get the follow permissions error:
ghc-pkg.exe: c:/Program Files/Haskell
Platform/2010.2.0.0\lib\package.conf.d\package.cache: you don't have
permission to modify this file

I changed this file to be world-writeable but with the same results.

I get the same error if I try and cabal install gtk.

Thanks for your help.
-deech

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


[Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
Hi,
  I see this kind of information a lot when I using cabal to install
package. Or sometimes same packages both exist in global and user
space, which is a shadowed by message.
  How to resolve that? Thanks.

Resolving dependencies...
command line: cannot satisfy -package Cabal-1.10.0.0:
Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
missing or recursive dependencies:
  process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
(use -v for more information)
-- 
竹密岂妨流水过
山高哪阻野云飞

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 13:35, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 Hi,
  I see this kind of information a lot when I using cabal to install
 package. Or sometimes same packages both exist in global and user
 space, which is a shadowed by message.
  How to resolve that? Thanks.

 Resolving dependencies...
 command line: cannot satisfy -package Cabal-1.10.0.0:
    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
 missing or recursive dependencies:
      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
    (use -v for more information)

This means you built Cabal-1.10.0.0 against process-1.0.1.4, but have
subsequently upgraded (or downgraded or uninstalled) process.  As
such, rebuild Cabal.

ghc-pkg check will give you a list of all broken packages.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

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


[Haskell-cafe] Haskell Weekly News: Issue 162 - December 15, 2010

2010-12-15 Thread Daniel Santa Cruz
   Welcome to issue 162 of the HWN, a newsletter covering developments in
   the [1]Haskell community in the week of December 05 - 11.

   Wouter Swierstra [2]sent a call for papers for the ICFP 2011 to be held
   in Tokyo, Japan between September 19 - 21. The announcement contains
   all relevant dates of importance

   Dmitry Astapov [3]announced the realease of haskell-mpi, a suite of
   Haskell bindings to the C MPI [Message Passing Interface] and
   convenience APIs on top of it.

   David Waern [4]annouced a new version of the venerable Haddock. This
   version is compatible with .haddock files produced by the version of
   Haddock that comes with GHC 7.0.1.

   Michael Snoyman [5]announced the first release of his library and
   executable packdeps. This is a library and executable containing the
   same functionality as the original packdeps website, namely letting you
   know when your version bounds exclude the use of the newest version of
   a library available.

   Michael also [6]announced the second major release of the mime-mail
   library. This is a package providing support for rendering multipart
   emails.

   Jasper Van der Jeugt [7]announced the 0.0.2.0 release of the digestive
   functors library. The library provides a general API to input
   consumption, and is an upgrade of formlets.

   So, what went on this week?

Top Reddit Stories

   * Cartesian Closed Comic: Résumé
 Domain: ro-che.info, Score: 35, Comments: 1
 On Reddit:
http://www.reddit.com/r/haskell/comments/ekiao/cartesian_closed_comic_résumé/
 Original: http://ro-che.info/ccc/11.html

   * GHC blog: An overhaul of stack management, and some performance
improvements
 Domain: hackage.haskell.org, Score: 32, Comments: 2
 On Reddit:
http://www.reddit.com/r/haskell/comments/emabe/ghc_blog_an_overhaul_of_stack_management_and_some/
 Original: http://hackage.haskell.org/trac/ghc/blog/stack-chunks

   * How do You use Emacs for Haskell Development?
 Domain: self.haskell, Score: 29, Comments: 10
 On Reddit:
http://www.reddit.com/r/haskell/comments/ehl99/how_do_you_use_emacs_for_haskell_development/
 Original: 
/r/haskell/comments/ehl99/how_do_you_use_emacs_for_haskell_development/

   * Library versus Framework: Yesod's Own World
 Domain: docs.yesodweb.com, Score: 26, Comments: 22
 On Reddit:
http://www.reddit.com/r/haskell/comments/ejgen/library_versus_framework_yesods_own_world/
 Original: http://docs.yesodweb.com/blog/yesods-own-world/

   * Visualizing Haskell types part II, Gin and monotonic : Inside T5
 Domain: blog.ezyang.com, Score: 24, Comments: 2
 On Reddit:
http://www.reddit.com/r/haskell/comments/eiaef/visualizing_haskell_types_part_ii_gin_and/
 Original: http://blog.ezyang.com/2010/12/gin-and-monotonic/

   * Package of the day: parallel-io: combinators for sequencing IO
actions onto a thread pool
 Domain: hackage.haskell.org, Score: 21, Comments: 15
 On Reddit:
http://www.reddit.com/r/haskell/comments/ehsqo/package_of_the_day_parallelio_combinators_for/
 Original: http://hackage.haskell.org/package/parallel-io-0.2.2

   * Package of the day: haskell-mpi: Control.Parallel.MPI for high
performance parallel (cluster) computations in Haskell
 Domain: hackage.haskell.org, Score: 19, Comments: 5
 On Reddit:
http://www.reddit.com/r/haskell/comments/ej5av/package_of_the_day_haskellmpi_controlparallelmpi/
 Original: http://hackage.haskell.org/package/haskell-mpi-1.0.0

   * From Polymorphism To Polytypism
 Domain: zenzike.com, Score: 19, Comments:
 On Reddit:
http://www.reddit.com/r/haskell/comments/ejleb/from_polymorphism_to_polytypism/
 Original: 
http://zenzike.com/posts/2010-12-10-from-polymorphic-to-polytypic/

   * Hussling Haskell types into Hasse diagrams : Inside T5
 Domain: blog.ezyang.com, Score: 18, Comments:
 On Reddit:
http://www.reddit.com/r/haskell/comments/eh2zw/hussling_haskell_types_into_hasse_diagrams_inside/
 Original: 
http://blog.ezyang.com/2010/12/hussling-haskell-types-into-hasse-diagrams/

   * Building a business with Haskell: Case Studies: Cryptol, HaLVM and Copilot
 Domain: corp.galois.com, Score: 17, Comments: 1
 On Reddit:
http://www.reddit.com/r/haskell/comments/ejmwq/building_a_business_with_haskell_case_studies/
 Original: 
http://corp.galois.com/blog/2010/12/10/building-a-business-with-haskell-case-studies-cryptol-halvm-1.html

Top StackOverflow Questions

   * What is the benefit of purely functional data structure?
 votes: 15, answers: 4
 Read on SO:
http://stackoverflow.com/questions/4399837/what-is-the-benefit-of-purely-functional-data-structure

   * Haskell: Equation Expander 1+(1+(1+(1+(…=∞
 votes: 9, answers: 2
 Read on SO:
http://stackoverflow.com/questions/4404663/haskell-equation-expander-

   * Pure Functional Language: Haskell
 votes: 7, answers: 6
 Read on SO:

Re: [Haskell-cafe] cannot install regex-posix using cabal ?

2010-12-15 Thread z_axis

canot it be fixed ?

-
e^(π.i) + 1 = 0
-- 
View this message in context: 
http://haskell.1045720.n5.nabble.com/cannot-install-regex-posix-using-cabal-tp3301201p3307465.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 10:55 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 On 16 December 2010 13:35, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
 Hi,
  I see this kind of information a lot when I using cabal to install
 package. Or sometimes same packages both exist in global and user
 space, which is a shadowed by message.
  How to resolve that? Thanks.

 Resolving dependencies...
 command line: cannot satisfy -package Cabal-1.10.0.0:
    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
 missing or recursive dependencies:
      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
    (use -v for more information)

 This means you built Cabal-1.10.0.0 against process-1.0.1.4, but have
 subsequently upgraded (or downgraded or uninstalled) process.  As
 such, rebuild Cabal.

 ghc-pkg check will give you a list of all broken packages.

 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 IvanMiljenovic.wordpress.com


The annoying thing is, I did not upgrade Cabal. Cabal and process are
now coming with ghc 7. But many cabal packages do not know about this,
I am not sure if this is cabal's fault or the packages'. So when
installing some packages by cabal, they install the same version of,
for example, process again. Then other packages depend on Cabal will
give out this error.

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

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 2:24 PM, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 On Thu, Dec 16, 2010 at 10:55 AM, Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com wrote:
 On 16 December 2010 13:35, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
 Hi,
  I see this kind of information a lot when I using cabal to install
 package. Or sometimes same packages both exist in global and user
 space, which is a shadowed by message.
  How to resolve that? Thanks.

 Resolving dependencies...
 command line: cannot satisfy -package Cabal-1.10.0.0:
    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
 missing or recursive dependencies:
      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
    (use -v for more information)

 This means you built Cabal-1.10.0.0 against process-1.0.1.4, but have
 subsequently upgraded (or downgraded or uninstalled) process.  As
 such, rebuild Cabal.

 ghc-pkg check will give you a list of all broken packages.

 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 IvanMiljenovic.wordpress.com


 The annoying thing is, I did not upgrade Cabal. Cabal and process are
 now coming with ghc 7. But many cabal packages do not know about this,
 I am not sure if this is cabal's fault or the packages'. So when
 installing some packages by cabal, they install the same version of,
 for example, process again. Then other packages depend on Cabal will
 give out this error.

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


And, sure, I could reinstall Cabal. Then things seem fine. But it is
weird. I have to have the same packages installed at two places of the
system.

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

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


Re: [Haskell-cafe] $ do?

2010-12-15 Thread Brandon Moore
 From: Roman Cheplyaka r...@ro-che.info
 Sent: Wed, December 15, 2010 1:36:55 AM
 
 * Jonathan Geddes geddes.jonat...@gmail.com  [2010-12-14 19:59:14-0700]
  Quick question:
  
  Why do I  need the $ in the following bits of code?
  
   main =  withSocketsDo $ do
  --do something with sockets
  
   foo = fromMaybe 0 $ do
  --do something in  the maybe monad
  
  I don't see (after admittedly only a minute or  so thinking about it)
  where any grammar ambiguities would be if 'do' had  an implicit $ in
  front of it:
  
   foo = fromMaybe 0  do
   --do something in maybe
  
  Though  now that I've written it down, that is hard for me to visually
  parse at  a glance. I'm still curious though.
 
 Hi Jonathan,
 
 it's not clear  whether you ask how this implies from the standard or
 what the rationale of  such syntax is.
 
 Regarding the former, there are two distinct syntactic  categories in
 Haskell: lexp and aexp. aexp produces all the constructs that  can be
 used as function arguments and does not include do expressions. lexp  is
 more broad and produces do expressions as well. Next look at  these
 productions to see the difference between function application  and
 operator application (sections 3.3 and 3.4 of 2010 report):
 
  fexp→ [fexp] aexp
 
 infixexp → lexp qop  infixexp
 
 Regarding the rationale, I'm not so sure and I'd like to hear  an
 explanation from someone competent. But I assume it has something
 to do  with the fact that if you supply a 'do' argument, you cannot
 supply any more  arguments (because 'do' extends to the right as far as
 possible). Not that  I'm convinced that it is a valid reason to prohibit
 such construct.


Years ago, I built GHC with a modified grammar including do and lambdas as aexp.
It seemed to work. There were certainly conflicts reported by Happy, but 
examples
seemed to work nicely and I couldn't think of any actual ambiguity.

Brandon



  

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


Re: [Haskell-cafe] Beginners help

2010-12-15 Thread z_axis

According to map's definition, we know the 'fs' should be a list of function.
so 'p' need a [a-b] as its parameter.And the result of 'p' should be a
list of function which accepts [a] and return [b].

So the type of 'p' is [a-b] - [[a] - [b]]


hope i make it clear.

-
e^(π.i) + 1 = 0
-- 
View this message in context: 
http://haskell.1045720.n5.nabble.com/Beginners-help-tp3306796p3307470.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 17:26, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 And, sure, I could reinstall Cabal. Then things seem fine. But it is
 weird. I have to have the same packages installed at two places of the
 system.

What makes you say that?  Does ghc-pkg list show it twice?

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 On 16 December 2010 17:26, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
 And, sure, I could reinstall Cabal. Then things seem fine. But it is
 weird. I have to have the same packages installed at two places of the
 system.

 What makes you say that?  Does ghc-pkg list show it twice?

 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 IvanMiljenovic.wordpress.com


Yep.
For example, now I have message as this when installing darcs.
command line: cannot satisfy -package Cabal-1.10.0.0:
Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
missing or recursive dependencies:
  process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
(use -v for more information)
The only way I know to get rid of this is to install Cabal-1.10.0.0
again. Then you could see that, it exists both global and user.
$ ghc-pkg list
/usr/local/lib/ghc-7.0.1/package.conf.d
   Cabal-1.10.0.0
   array-0.3.0.2
   base-4.3.0.0
   bin-package-db-0.0.0.0
   bytestring-0.9.1.8
   containers-0.4.0.0
   directory-1.1.0.0
   extensible-exceptions-0.1.1.2
   ffi-1.0
   filepath-1.2.0.0
   ghc-7.0.1
   ghc-binary-0.5.0.2
   ghc-prim-0.2.0.0
   haskell2010-1.0.0.0
   haskell98-1.1.0.0
   hpc-0.5.0.6
   integer-gmp-0.2.0.2
   old-locale-1.0.0.2
   old-time-1.0.0.6
   pretty-1.0.1.2
   process-1.0.1.4
   random-1.0.0.3
   rts-1.0
   template-haskell-2.5.0.0
   time-1.2.0.3
   unix-2.4.1.0
/home/magicloud/.ghc/i386-linux-7.0.1/package.conf.d
   Cabal-1.10.0.0
   HTTP-4000.0.10
   binary-0.5.0.2
   containers-0.3.0.0
   dataenc-0.13.0.4
   deepseq-1.1.0.2
   directory-1.0.1.2
   filepath-1.1.0.4
   html-1.0.1.2
   mmap-0.5.7
   mtl-1.1.1.1
   network-2.2.1.10
   parsec-2.1.0.1
   process-1.0.1.4
   regex-base-0.93.2
   regex-compat-0.93.1
   regex-posix-0.94.4
   tar-0.3.1.0
   terminfo-0.3.1.3
   text-0.11.0.1
   utf8-string-0.3.6
   zlib-0.5.2.0
-- 
竹密岂妨流水过
山高哪阻野云飞

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Ivan Lazar Miljenovic
On 16 December 2010 18:30, Magicloud Magiclouds
magicloud.magiclo...@gmail.com wrote:
 On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic
 For example, now I have message as this when installing darcs.
 command line: cannot satisfy -package Cabal-1.10.0.0:
    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
 missing or recursive dependencies:
      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
    (use -v for more information)
 The only way I know to get rid of this is to install Cabal-1.10.0.0
 again. Then you could see that, it exists both global and user.
 $ ghc-pkg list
 /usr/local/lib/ghc-7.0.1/package.conf.d
   Cabal-1.10.0.0
   array-0.3.0.2
   base-4.3.0.0
   bin-package-db-0.0.0.0
   bytestring-0.9.1.8
   containers-0.4.0.0
   directory-1.1.0.0
   extensible-exceptions-0.1.1.2
   ffi-1.0
   filepath-1.2.0.0
   ghc-7.0.1
   ghc-binary-0.5.0.2
   ghc-prim-0.2.0.0
   haskell2010-1.0.0.0
   haskell98-1.1.0.0
   hpc-0.5.0.6
   integer-gmp-0.2.0.2
   old-locale-1.0.0.2
   old-time-1.0.0.6
   pretty-1.0.1.2
   process-1.0.1.4
   random-1.0.0.3
   rts-1.0
   template-haskell-2.5.0.0
   time-1.2.0.3
   unix-2.4.1.0
 /home/magicloud/.ghc/i386-linux-7.0.1/package.conf.d
   Cabal-1.10.0.0
   HTTP-4000.0.10
   binary-0.5.0.2
   containers-0.3.0.0
   dataenc-0.13.0.4
   deepseq-1.1.0.2
   directory-1.0.1.2
   filepath-1.1.0.4
   html-1.0.1.2
   mmap-0.5.7
   mtl-1.1.1.1
   network-2.2.1.10
   parsec-2.1.0.1
   process-1.0.1.4
   regex-base-0.93.2
   regex-compat-0.93.1
   regex-posix-0.94.4
   tar-0.3.1.0
   terminfo-0.3.1.3
   text-0.11.0.1
   utf8-string-0.3.6
   zlib-0.5.2.0

You seem to have process installed twice... any reason for that?
Possibly something has gone wrong with your user setup; try backing up
your ~/.ghc, deleting it and try again.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com

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


Re: [Haskell-cafe] Cabal message problem.

2010-12-15 Thread Magicloud Magiclouds
On Thu, Dec 16, 2010 at 3:48 PM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
 On 16 December 2010 18:30, Magicloud Magiclouds
 magicloud.magiclo...@gmail.com wrote:
 On Thu, Dec 16, 2010 at 2:59 PM, Ivan Lazar Miljenovic
 For example, now I have message as this when installing darcs.
 command line: cannot satisfy -package Cabal-1.10.0.0:
    Cabal-1.10.0.0-9ac678c7f1e4f8dd31bac0e19f600698 is unusable due to
 missing or recursive dependencies:
      process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420
    (use -v for more information)
 The only way I know to get rid of this is to install Cabal-1.10.0.0
 again. Then you could see that, it exists both global and user.
 $ ghc-pkg list
 /usr/local/lib/ghc-7.0.1/package.conf.d
   Cabal-1.10.0.0
   array-0.3.0.2
   base-4.3.0.0
   bin-package-db-0.0.0.0
   bytestring-0.9.1.8
   containers-0.4.0.0
   directory-1.1.0.0
   extensible-exceptions-0.1.1.2
   ffi-1.0
   filepath-1.2.0.0
   ghc-7.0.1
   ghc-binary-0.5.0.2
   ghc-prim-0.2.0.0
   haskell2010-1.0.0.0
   haskell98-1.1.0.0
   hpc-0.5.0.6
   integer-gmp-0.2.0.2
   old-locale-1.0.0.2
   old-time-1.0.0.6
   pretty-1.0.1.2
   process-1.0.1.4
   random-1.0.0.3
   rts-1.0
   template-haskell-2.5.0.0
   time-1.2.0.3
   unix-2.4.1.0
 /home/magicloud/.ghc/i386-linux-7.0.1/package.conf.d
   Cabal-1.10.0.0
   HTTP-4000.0.10
   binary-0.5.0.2
   containers-0.3.0.0
   dataenc-0.13.0.4
   deepseq-1.1.0.2
   directory-1.0.1.2
   filepath-1.1.0.4
   html-1.0.1.2
   mmap-0.5.7
   mtl-1.1.1.1
   network-2.2.1.10
   parsec-2.1.0.1
   process-1.0.1.4
   regex-base-0.93.2
   regex-compat-0.93.1
   regex-posix-0.94.4
   tar-0.3.1.0
   terminfo-0.3.1.3
   text-0.11.0.1
   utf8-string-0.3.6
   zlib-0.5.2.0

 You seem to have process installed twice... any reason for that?
 Possibly something has gone wrong with your user setup; try backing up
 your ~/.ghc, deleting it and try again.

 --
 Ivan Lazar Miljenovic
 ivan.miljeno...@gmail.com
 IvanMiljenovic.wordpress.com


Yes. When I reinstalled Cabal to user space, it also installed process
to user space again. And I also do not know why the global process
does not fit it.
But checking the package.conf.d shows:
/usr/local/lib/ghc-7.0.1/package.conf.d/process-1.0.1.4-24e3819e5c17aaf49bfec6a0ab739420.conf
/home/magicloud/.ghc/i386-linux-7.0.1/package.conf.d/process-1.0.1.4-dbac0acfd36adbff7779acc361040910.conf
The hash code is different. Also are the Cabal-1.10.0.0-*.conf.

Really hoping cabal has some kind of way to ignore these version thing.
-- 
竹密岂妨流水过
山高哪阻野云飞

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