#x27;d also like to avoid cramming all of the possible layer
input and output types into one giant ADT in such a solution.
--
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
.Environment.UTF8 module
to utf8-string 0.3.5
This module behaves like the System.IO.UTF8 wrapper.
--
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Smaller example of this behavior:
> array ((0,0),(1,1)) [((1,1),6)] ! (0,3)
6
--
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
where
aux (cur, best) x = (max 0 cur', max best cur')
where
cur' = cur + x
--
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 7/17/07, James Hunt <[EMAIL PROTECTED]> wrote:
As a struggling newbie, I've started to try various exercises in order
to improve. I decided to try the latest Ruby Quiz
(http://www.rubyquiz.com/quiz131.html) in Haskell. Would someone be kind
enough to cast their eye over my code? I get the feel
error handling, I noticed that Python has three modes for
decoding UTF-8: strict, replace, and ignore.
strict: error "bad encoding"
replace: ('\xfffd' :)
ignore: id
which I could add if there was interest.
--
Eric Mertens
___
Haskell-Cafe
tring-0.1
source code is available via:
darcs get http://code.haskell.org/utf8-string/
--
Eric Mertens
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-- here was my original before I allowed someone (no names) to mangle
mine for me ;)
import Control.Monad (liftM, forM_)
import Directory (getModificationTime, renameFile)
import Text.Printf (printf)
import System.FilePath ((),(<.>))
import System.Locale (defaultTimeLocale)
import System.Path.Glo
-- Here's my contribution to the "Haskell" way to do it
import Directory (renameFile)
import System.FilePath
import System.Path.Glob (glob)
import System.Time
basenames= [ "mail.log", "thttpd.log" ]
logdir = "/var/log"
archivedir = "/var/log/archive"
main = forM_ bases $ \base -> do
's IRC bot
tutorial.
darcs has been instrumental in this colaborative effort, and the
hpaste source is available with:
darcs get --partial http://www.scannedinavian.com/~eric/hpaste
Feedback is both encouraged and welcomed!
--
Eric Mertens
[
10 matches
Mail list logo