Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Duncan Coutts
On Fri, 2009-12-18 at 23:01 +, Ozgur Akgun wrote:
 Hi,
 
 When I run cabal install zlib or cabal upgrade zlib I get the
 following error:
 
 Resolving dependencies...
 Configuring zlib-0.5.2.0...
 Preprocessing library zlib-0.5.2.0...
 Only one output file may be specified

We'll need more details here. Try running with -v2 or -v3. It should say
what command it's running.

Duncan

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


Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Ozgur Akgun
Thanks for the feedback.

I guess the following part is the problematic part: (But I've no idea how to
resolve it)

Creating dist/build (and its parents)
Creating dist/build/autogen (and its parents)
Preprocessing library zlib-0.5.2.0...
Creating dist/build/Codec/Compression/Zlib (and its parents)
/usr/bin/hsc2hs --cc=/usr/bin/gcc --ld=/usr/bin/gcc
--cflag=-D__GLASGOW_HASKELL__=610 --lflag=-lz
--cflag=-I/Users/ozgurakgun/.cabal/lib/bytestring-0.9.1.5/ghc-6.10.4/include
--cflag=-I/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0/include
--cflag=-I/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include
--lflag=-L/Users/ozgurakgun/.cabal/lib/bytestring-0.9.1.5/ghc-6.10.4
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-3.0.3.1
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/syb-0.1.0.1
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/integer-0.1.0.1
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/ghc-prim-0.1.0.0
--lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4
--lflag=-lm --lflag=-lffi --lflag=-lgmp --lflag=-ldl *-o
dist/build/Codec/Compression/Zlib/Stream.hs
Codec/Compression/Zlib/Stream.hsc*
Only one output file may be specified
cabal: Error: some packages failed to install:
zlib-0.5.2.0 failed during the building phase. The exception was:
exit: ExitFailure 1


2009/12/19 Duncan Coutts duncan.cou...@googlemail.com

 On Fri, 2009-12-18 at 23:01 +, Ozgur Akgun wrote:
  Hi,
 
  When I run cabal install zlib or cabal upgrade zlib I get the
  following error:
 
  Resolving dependencies...
  Configuring zlib-0.5.2.0...
  Preprocessing library zlib-0.5.2.0...
  Only one output file may be specified

 We'll need more details here. Try running with -v2 or -v3. It should say
 what command it's running.

 Duncan




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


Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Max Cantor
I actually ran into this problem last night.  Here's my workaround (note that 
it involves downgrading to zlib-0.5.0.0

1) unregister the zlib-0.5.2.0 package (prompt ghc-pkg unregister zlib-0.5.2.0)
2) rebuild and install cabal-install:
prompt tar -zxvf 
~/.cabal/packages/hackage.haskell.org/cabal-install/0.6.4/cabal-install-0.6.4.tar.gz
prompt cd cabal-install-0.6.4
prompt runghc Setup.hs configure --user  runghc Setup.hs build  
runghc Setup.hs install

Note that this requires that you still have zlib-0.5.0.0 installed.  Also your 
paths and options for configuring may vary.  But, this worked for me.

Max

On Dec 19, 2009, at 5:39 PM, Ozgur Akgun wrote:

 Thanks for the feedback.
 
 I guess the following part is the problematic part: (But I've no idea how to 
 resolve it)
 
 Creating dist/build (and its parents)
 Creating dist/build/autogen (and its parents)
 Preprocessing library zlib-0.5.2.0...
 Creating dist/build/Codec/Compression/Zlib (and its parents)
 /usr/bin/hsc2hs --cc=/usr/bin/gcc --ld=/usr/bin/gcc 
 --cflag=-D__GLASGOW_HASKELL__=610 --lflag=-lz 
 --cflag=-I/Users/ozgurakgun/.cabal/lib/bytestring-0.9.1.5/ghc-6.10.4/include 
 --cflag=-I/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0/include
  
 --cflag=-I/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/include
  --lflag=-L/Users/ozgurakgun/.cabal/lib/bytestring-0.9.1.5/ghc-6.10.4 
 --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-3.0.3.1
  
 --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/syb-0.1.0.1
  
 --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/base-4.1.0.0
  
 --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/integer-0.1.0.1
  
 --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4/ghc-prim-0.1.0.0
  --lflag=-L/Library/Frameworks/GHC.framework/Versions/610/usr/lib/ghc-6.10.4 
 --lflag=-lm --lflag=-lffi --lflag=-lgmp --lflag=-ldl -o 
 dist/build/Codec/Compression/Zlib/Stream.hs Codec/Compression/Zlib/Stream.hsc
 Only one output file may be specified
 cabal: Error: some packages failed to install:
 zlib-0.5.2.0 failed during the building phase. The exception was:
 exit: ExitFailure 1
 
 
 2009/12/19 Duncan Coutts duncan.cou...@googlemail.com
 On Fri, 2009-12-18 at 23:01 +, Ozgur Akgun wrote:
  Hi,
 
  When I run cabal install zlib or cabal upgrade zlib I get the
  following error:
 
  Resolving dependencies...
  Configuring zlib-0.5.2.0...
  Preprocessing library zlib-0.5.2.0...
  Only one output file may be specified
 
 We'll need more details here. Try running with -v2 or -v3. It should say
 what command it's running.
 
 Duncan
 
 
 
 
 -- 
 Ozgur Akgun
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

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


[Haskell-cafe] Re: Pattern matching, and bugs

2009-12-19 Thread John Lato
 From: Felipe Lessa felipe.le...@gmail.com

 On Fri, Dec 18, 2009 at 02:13:02PM +, John Lato wrote:
 So now the program needs a result of some type (String in your
 example) and gets an undefined, and then immediately crashes
 with an Exception - undefined error.

 I think this is the second time this is said in this thread, but
 please don't as it may confuse the OP.  undefineds, including
 those generated by missing cases, do *not* crash the program.
 They also do not *immediately* close the program.  They are
 propagated as exceptions are, however most of the time we write
 programs without explicitly catching them.

Of course you're correct.  I was careful to note that undefined's
generate exceptions, but left out the rest on the assumption that the
OP would be familiar with exception handling and propagation.  But it
is best to be perfectly explicit.


 So the proper wording would be that the undefineds propagate
 through the functions and whenever they reach the top function
 (i.e. main), they are caught by the runtime system, which prints
 the String associated with the undefined and exits the proccess
 with an error code.

 I should note also that *pure* code *can't* catch those
 undefineds.  If they could, then Nasty Things Would Happen(TM)
 and we don't want that.  However IO code may catch them without
 any problem using Control.Exception's functions.

I agree this is an important point, particularly as it's different
from declarative/OOP exception mechanisms.

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


[Haskell-cafe] How to use Control.Failure?

2009-12-19 Thread ntupel
I have looked at the recently released Control.Failure library but I
admit, I couldn't understand it completely. So given the example
below, how would Control.Failure help me here?

Thanks,
nt


-- Theirs (other library code stubs)
data TheirError = TheirErrorCase deriving Show
data TheirData  = TheirData deriving Show

theirFunc :: [String] - Either TheirError TheirData
theirFunc = undefined


-- Mine (my own code stubs)
data MyError = MyErrorCase deriving Show
data MyData  = MyData deriving Show

myFuncA :: TheirData - Either MyError MyData
myFuncA = undefined


-- Ugly. How to apply Control.Failure here?
myFuncB :: IO (Either MyError MyData)
myFuncB = do
let x = theirFunc []
case x of
Right x' - return $ myFuncA x'
Left  _  - return . Left $ MyErrorCase
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Weekly News: Issue 144 - December 19, 2009

2009-12-19 Thread jfredett

---
Haskell Weekly News
http://sequence.complete.org/hwn/20091219
Issue 144 - December 19, 2009
---
   Welcome to issue 144 of HWN, a newsletter covering developments in the
   [1]Haskell community.

   The big news this week is the release of the Glorious Glasgow Haskell
   compiler version 6.12.1, lots of exciting new improvements,
   congratulations from the whole community go out to the devs, good work
   GHC Team! Otherwise, this week has been quiet, with some interesting
   discussions about associated types and the new GHC, and some excellent
   new packages announced. Finally, due to the incoming holidays, there
   won't be an HWN for the next two weeks, I'll see you Haskellers in
   2010, until then, your Haskell Weekly News!

Announcements

   GHC version 6.12.1. Ian Lynagh [2]announced the (Interactive) Glasgow
   Haskell Compiler, version 6.12.1. Including improved support for
   parallel execution, Dynamic linking support on Linux, and many other
   improvments.

   atom-0.1.4. Tom Hawkins [3]announced a bug fix release of the atom
   package, affecting floating point variable initialization.

   text 0.7, fast Unicode text. Bryan O'Sullivan [4]announced a new
   release of the text package adds support for Unicode I/O

   explicit-iomodes-0.1. Bas van Dijk [5]announced explicit-iomodes
   version 0.1, a wrapper around System.IO that provides a Handle type
   which is parametrized with the IOMode it is in.

   Hemkay, the 100% Haskell MOD player. Patai Gergely [6]announced a
   Hemkay, an old-school MOD player in pure Haskell.

   GT-VMT 2010: deadlines extended. Emilio Tuosto [7]announced a deadline
   extension to the GT-VMT call for papers.

Discussion

   Restrictions on associated types for classes. Stephen Lavelle [8]asked
   if there was a way to wrap a associated type in a class constraint.

   Yay 6.12.1! Evan Laforge [9]talked about some of the changes in the new
   version of GHC.

Blog noise

   [10]Haskell news from the [11]blogosphere. Blog posts from people new
   to the Haskell community are marked with , be sure to welcome them!
 * Michael Snoyman: [12]data-object family.
 * Bryan O'Sullivan: [13]Making GHC's I/O manager more scalable.
 * Conor McBride: [14]Epilogue for Epigram: 2+2=4.
 * Sebastian Fischer: [15]Thesis submitted.
 * Bryan O'Sullivan: [16]Data.Text 0.7 gains I/O support.
 * Ketil Malde: [17]Searching for poly(A) tails.
 * Mark Jason Dominus: [18]Monads are like burritos.
 * Sean Leather: [19]Upwards and downwards accumulations on trees
   translated into Haskell.

Quotes of the Week

 * yrlnry: byorgey yrlnry: just some lady who had a lot of money and
   decided she wanted poor grad students to have some of it after she
   died... pretty nice of her, actually yrlnry senile dementia, more
   likely.
 * Philonous: A 'newbie', in Haskell, is someone who hasn't yet
   implemented a compiler. They've only written a monad tutorial.
 * kmc: Right, for example Either (pun not intended)
 * kmc: One thing I've learned from open-source software is that if
   you invent enough wheels, one of them will turn out to be round and
   capable of rolling.
 * PhilipWadler: To see that in and out are inverses, stare at the
   following diagram
 * kmc: Data.Map is like a C++ STL mapk,v, without the suck
 * edwardkmett: Most monad tutorials are written by people who barely
   understand monads, if at all, but unfortunately nothing can stop
   someone from writing a monad tutorial. We've tried, there was blood
   everywhere.
 * Cale: A small category is a monad in the 2-category of spans of
   sets.

About the Haskell Weekly News

   New editions are posted to [20]the Haskell mailing list as well as to
   [21]the Haskell Sequence and [22]Planet Haskell. [23]RSS is also
   available, and headlines appear on [24]haskell.org.

   To help create new editions of this newsletter, please see the
   information on [25]how to contribute. Send stories to jfredett . at .
   gmail . dot . com. The darcs repository is available at darcs get
   [26]http://patch-tag.com/r/jfredett/HWN2/pullrepo HWN2 .

References

   1. http://haskell.org/
   2. http://article.gmane.org/gmane.comp.lang.haskell.general/17678
   3. http://article.gmane.org/gmane.comp.lang.haskell.cafe/68009
   4. http://article.gmane.org/gmane.comp.lang.haskell.cafe/67946
   5. http://article.gmane.org/gmane.comp.lang.haskell.cafe/67931
   6. http://article.gmane.org/gmane.comp.lang.haskell.cafe/67923
   7. http://article.gmane.org/gmane.comp.lang.haskell.general/17676
   8. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/68084
   9. http://thread.gmane.org/gmane.comp.lang.haskell.cafe/67950
  10. http://planet.haskell.org/
  11. http://haskell.org/haskellwiki/Blog_articles

Re: [Haskell-cafe] How to use Control.Failure?

2009-12-19 Thread Michael Snoyman
On Sat, Dec 19, 2009 at 4:46 PM, ntupel ntu...@googlemail.com wrote:

 I have looked at the recently released Control.Failure library but I
 admit, I couldn't understand it completely. So given the example
 below, how would Control.Failure help me here?

 Thanks,
 nt


 -- Theirs (other library code stubs)
 data TheirError = TheirErrorCase deriving Show
 data TheirData  = TheirData deriving Show

 theirFunc :: [String] - Either TheirError TheirData
 theirFunc = undefined


 -- Mine (my own code stubs)
 data MyError = MyErrorCase deriving Show
 data MyData  = MyData deriving Show

 myFuncA :: TheirData - Either MyError MyData
 myFuncA = undefined


 -- Ugly. How to apply Control.Failure here?
 myFuncB :: IO (Either MyError MyData)
 myFuncB = do
let x = theirFunc []
case x of
Right x' - return $ myFuncA x'
Left  _  - return . Left $ MyErrorCase
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


Well, here's one way of doing it. You have lots of choices here; these are
the decisions I made in implementing the code:

* myFuncB no longer lives in the IO monad. I wasn't sure if you specifically
wanted that, but now it can work with *any* instance of Failure.
* Since I assumed you ultimately wanted it to land in the IO monad, I
defined Exception instances. However, if you were dealing with a different
Failure instance (like [] or Maybe), these would be unncesary.
* I also assume that what you meant by your code and their code is that
you can modify your own code, but not theirs.

If you show me what the real code is you're working on, I'd be happy to more
fully develop a better solution with you. Anyway, here's the code.

Michael

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
import Control.Failure
import Data.Typeable (Typeable)
import Control.Exception (Exception)

-- Theirs (other library code stubs)
data TheirError = TheirErrorCase deriving Show
data TheirData  = TheirData deriving Show

theirFunc :: [String] - Either TheirError TheirData
theirFunc = undefined


-- Mine (my own code stubs)
data MyError = MyErrorCase deriving (Show, Typeable)
instance Exception MyError
deriving instance Typeable TheirError
instance Exception TheirError
data MyData  = MyData deriving Show

myFuncA :: MonadFailure MyError m = TheirData - m MyData
--myFuncA :: TheirData - Either MyError MyData
myFuncA = undefined


myFuncB :: (MonadFailure MyError m, MonadFailure TheirError m)
= m MyData
myFuncB = do
   x - try $ theirFunc []
   myFuncA x
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: How to use Control.Failure?

2009-12-19 Thread ntupel
On Dec 19, 5:14 pm, Michael Snoyman mich...@snoyman.com wrote:

 Well, here's one way of doing it. You have lots of choices here; these are
 the decisions I made in implementing the code:

 * myFuncB no longer lives in the IO monad. I wasn't sure if you specifically
 wanted that, but now it can work with *any* instance of Failure.
 * Since I assumed you ultimately wanted it to land in the IO monad, I
 defined Exception instances. However, if you were dealing with a different
 Failure instance (like [] or Maybe), these would be unncesary.
 * I also assume that what you meant by your code and their code is that
 you can modify your own code, but not theirs.

 If you show me what the real code is you're working on, I'd be happy to more
 fully develop a better solution with you. Anyway, here's the code.

Thank you very much. This helped a lot. I wasn't aware of many of the
details you showed me now, such as deriving from Typeable. The
assumptions you have made w.r.t to what I want to write all make sense
and I guess I can experiment with Control.Failure a little better now.

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


Re: [Haskell-cafe] Pattern matching, and bugs

2009-12-19 Thread wren ng thornton

Ketil Malde wrote:

András Mocsáry amo...@gmail.com writes:

Now we have a problem, which is most generally fixed in these ways:
C-like:

switch ( x )
{
Case 0:
  Unchecked
Case 1:
  Checked
Case 2:
  Unknown
Default:
  Nothing
}


This is not a fix, this is a workaround for a design bug, namely that
x is of a type that allows meaningless data.


Indeed. In C-like languages it is common practice to use integers to 
mean just about anything. Often there are fewer of anything than there 
are integers, and so hacks like this are necessary to work around the 
ensuing problems. But ultimately, this is a *type error*.


The proper response, in Haskell, to type errors like this is not to add 
hacks catching bad values, but rather to change the types so that bad 
values cannot be constructed. As a few others have mentioned, rather 
than using an integer, you should define a new type like:


data X = Unchecked | Checked | Unknown

and then require that x is of type X. Thus the pattern-checker can 
verify that all possible values of x will match some case option.


The reason Haskell (or other typed functional languages) allow proving 
correctness so much easier than other languages is because we create new 
types which correctly and precisely match the set of values we want to 
belong to that type[1]. By pushing as much of the correctness logic as 
possible up into the type layer, this frees us from needing to check 
things at the term layer since the type-checker can capture type errors 
automatically. But it can't catch things we haven't told it are errors.



[1] For some complex sets of values this isn't possible with Haskell's 
type system, which is one of the reasons for the recent interest in 
dependently typed languages. However, for most familiar sets of values 
(and quite a few unfamiliar ones) Haskell's type system is more than enough.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] sizeOf on a type

2009-12-19 Thread wren ng thornton

Sean Leather wrote:

I can see what's going on:  it can't tell that the a I am writing there
is the same a that's in the type specification, but is there any way that
I can make it identify a with the a in the specification for nextPtr?



Lexically scoped type variables:
http://www.haskell.org/ghc/docs/latest/html/users_guide/other-type-extensions.html#scoped-type-variables


And if you require H98+FFI only, you can also use the following:

ptrSizeOf = sizeOf . asTypeOf undefined . unsafePerformIO . peek

The asTypeOf function is the H98 way of handling many scoped type 
variable issues. It never evaluates its second argument so the 
unsafePerformIO is perfectly safe since the peek will never be evaluated 
either (and, heck, the whole argument to sizeOf won't be evaluated either).


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: Happstack 0.4.1

2009-12-19 Thread Jeremy Shaw

Happstack 0.4.1 STABLE is now available.

We recommend that all users of Happstack update to 0.4.1
immediately. Migration from Happstack 0.3 should be trivial. There was
one race condition in happstack-state which could cause a state event
to fail under heavy congestion.

Happstack is the Haskell Application Server Stack. It is a scalable
framework for developing web applications. It is similar in purpose to
Django, RoR, Turbogears, Grails, Seaside, etc.

Using less buzzwords, it is a collection of libraries which can be
used to develop a self-contained server application which does not
require SQL or Apache (though it can integrate with both).

It includes:

   * an HTTP server
   * a rich DSL for deconstructing HTTP Requests and generating  
Responses

   * HTML/XML/etc templating via HStringTemplate, HSP, or Text.XHtml
   * a persistent data store based on user defined Haskell data types
 with ACID properties and state migration
   * and more!!

Happstack's modular nature means it is easy to integrate unrelated 3rd
party modules such as Pandoc, or to add support for an alternative
templating system. Additionally, it does not exclude you from using
SQL, or supporting other protocols besides HTTP.

HOMEPAGE:

   http://www.happstack.com/

SUPPORTED PLATFORMS:

   Happstack supports GHC 6.8, 6.10, and 6.12, under GNU/Linux,
   FreeBSD, OS X, and Windows.

   GHC 6.12 currently requires a minor patch to HJScript. Details here:


http://groups.google.com/group/haskell-server-pages/browse_thread/thread/56f388fdbaec1420

INSTALL:

   1. ensure that ~/.cabal/bin is in your $PATH
   2. cabal update
   3. cabal install happstack

   * see SUPPORTED PLATFORMS for information about GHC 6.12


NOTABLE CHANGES:

 For a complete list of changes see:

http://www.patch-tag.com/r/mae/happstack/snapshots/all/history

  Removed:

 * happstack-contrib has been completely removed. If you were  
using something in it, please complain on the mailing list.
 * removed Happstack.Server.S3 -- newer, better maintained S3  
libraries are on hackage now

 * removed unsupported spread-based multimaster support

  fileServe:

 * now with sendfile() support! On supported platforms sendfile
 allows files to be served from the disk to the network in a
 zero-copy fashion. This means faster transfers, less memory and
 CPU usage, and no file handle leaks. (hopefully). sendfile uses
 native sendfile() support on Linux, Windows, OS X, and
 FreeBSD. Other platforms will use a sendfile emulation mode. We
 recommend that you use sendFile instead of sendFileStrict or
 sendFileLazy, unless you have specific needs and know some reason
 why you must use sendFileStrict or sendFileLazy.

 * FileServe internals majorly refactored. FileServe now provides
 a modular way of building your own fileServe-like functions. Also
 includes functions for serving a single file instead of the
 contents of a directory.

 * added more complete list of mime-types
 * automatically redirect from foo to foo/ if foo is a directory
 * filter . and .. from request path, but allow filenames and  
directories which start with .


  happstack-server:

 * ServerMonad instance for ErrorT
 * Added ServerMonad, FilterMonad, and WebMonad for XMLGenT
 * Added secure flag to cookies. Defaults to False.
 * fix supportsIPv6 to work with newer versions of network library
 * simpleHTTPWithSocket + bindPort for H.S.SimpleHTTP (you can  
use this to start the server as root, bind to the socket, and then  
drop privileges.)
 * Fixed Accept-Encoding parser to accepts encodings with a - in  
them. Added additional tests to acceptEncodingParserTest

 * fix so basicAuth sets correct response code and headers.
 * SimpleHTTP: added trailingSlash. Guard which checks that  
Request URI ends with a /

 * decode body of PUT requests not just POST
 * added ifModifiedSince guard
 * added host and withHost guards to SimpleHTTP (similar to dir  
and path, but for the requested hostname)


 other:

 * happstack-state: Correct an embarrassing race condition bug.
 * happstack-data: Exported getSafeGet and getSafePut
 * happstack: add state transition code to guestbook (add email  
to form, handler, and state), and tar of example _local state before  
transition


 experimental:

 * happstack-state: now has experimental replication support using
   Amazon Web Services. This support is disabled by default. This
   feature is highly experimental, may not work, and may even be
   completely removed in future versions (though, hopefully not).

THANKS:

 Alex Jacobson
 David Himmelstrup / Lemmih
 Matthew Elder / mae
 Antoine Latter
 Erik Hesselink
 Pasqualino 'Titto' Assini
 Nils / McManiaC
 Thomas Hartman
 Creighton Hogg / wchogg
 John MacFarlane
 Jochem Berndsen / koeien
 MightByte

 And everyone who filed bug reports, tested RC1 and RC2, and anyone  

Re: [Haskell-cafe] Problem with cabal install zlib

2009-12-19 Thread Duncan Coutts
On Sat, 2009-12-19 at 09:39 +, Ozgur Akgun wrote:

 I guess the following part is the problematic part: (But I've no idea
 how to resolve it)

[..]

  --lflag=-lm --lflag=-lffi --lflag=-lgmp --lflag=-ldl *-o
 dist/build/Codec/Compression/Zlib/Stream.hs
 Codec/Compression/Zlib/Stream.hsc*
 Only one output file may be specified

Does that really use the character '*' ? That's pretty weird. Max, are
you getting the same? We'll need some help working out where that '*' is
coming from.

Duncan

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


Re: [Haskell-cafe] ANN: Happstack 0.4.1

2009-12-19 Thread Niklas Broberg
   GHC 6.12 currently requires a minor patch to HJScript. Details here:

HJScript-0.4.5 is now on hackage, fixing this problem. Thanks for the heads-up.

Cheers,

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


[Haskell-cafe] Search a directory for files

2009-12-19 Thread Eitan Goldshtrom

Hi,
I'm trying to make a program to make it easy to rename files in bulk. 
What I'm wondering is how to get a list of all files in a particular 
directory. I found System.Posix.Files and I'm planning on using the 
rename function in it for actually renaming, but I can't find an easy 
way to get all filenames in a particular directory. Does anyone know how 
to do it?


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


Re: [Haskell-cafe] Search a directory for files

2009-12-19 Thread Gregory Crosswhite
Look in System.Directory;  specifically, getDirectoryContents should do what 
you want.  You might also check out the FileManip package, which provides some 
convenient functionality for finding all files which match a particular pattern.

Cheers,
Greg

On Dec 19, 2009, at 6:40 PM, Eitan Goldshtrom wrote:

 Hi,
 I'm trying to make a program to make it easy to rename files in bulk. What 
 I'm wondering is how to get a list of all files in a particular directory. I 
 found System.Posix.Files and I'm planning on using the rename function in it 
 for actually renaming, but I can't find an easy way to get all filenames in a 
 particular directory. Does anyone know how to do it?
 
 -Eitan
 ___
 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] Search a directory for files

2009-12-19 Thread Eitan Goldshtrom

Thanks.
This looks like exactly what I was looking for. I feel silly for not 
finding it myself. =P


-Eitan


Gregory Crosswhite wrote:

Look in System.Directory;  specifically, getDirectoryContents should do what 
you want.  You might also check out the FileManip package, which provides some 
convenient functionality for finding all files which match a particular pattern.

Cheers,
Greg

On Dec 19, 2009, at 6:40 PM, Eitan Goldshtrom wrote:

  

Hi,
I'm trying to make a program to make it easy to rename files in bulk. What I'm 
wondering is how to get a list of all files in a particular directory. I found 
System.Posix.Files and I'm planning on using the rename function in it for 
actually renaming, but I can't find an easy way to get all filenames in a 
particular directory. Does anyone know how to do it?

-Eitan
___
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