Re: [Haskell-cafe] Stackage with GHC 7.8 has started

2013-10-14 Thread Sebastiaan Visser
Michael, I see one of my packages is on that list, because of the upper bound on template-haskell. I would love the raise the upper bound, but of course only if it will actually build. Can I download a binary version snapshot GHC 7.8 somewhere so I can test and apply changes accordingly? I

Re: [Haskell-cafe] Seeking Control.Lens Combinator

2013-10-05 Thread Sebastiaan Visser
Charles, I know you specifically asked for a Control.Lens combinator and I don't have one for you, but I take the opportunity to show you how easy this is using fclabels: tupleUp :: f :- a - f :- b - f :- (a, b) tupleUp a b = point $ (,) $ L.fst - a --

Re: [Haskell-cafe] Using lenses

2013-10-03 Thread Sebastiaan Visser
Simon, I've used lenses to manipulate URIs represented as strings in a structured way, like: modify (port . iso parsePrintUri) (+10) http://localhost:8070/index.html; Of course using fclabels and not lens ;-) Sebastiaan On Oct 3, 2013, at 10:07 AM, Simon Peyton-Jones simo...@microsoft.com

[Haskell-cafe] [ANN] fclabels 2.0

2013-10-01 Thread Sebastiaan Visser
Hello everyone, I’m excited to announce a brand new major version of fclabels. This library provides first class labels that can act as bidirectional record fields. The labels are implemented as lenses. This new version contains some interesting new features like support for polymorphic updates

Re: [Haskell-cafe] Using MonadFix to tie the knot with STM

2011-02-16 Thread Sebastiaan Visser
On Feb 12, 2011, at 6:08 PM, Antoine Latter wrote: On Sat, Feb 12, 2011 at 8:47 AM, Sebastiaan Visser hask...@fvisser.nl wrote: Hi all, During a little experiment I discovered there is no MonadFix instance available for the STM monad. Is this absence the consequence of some deep

[Haskell-cafe] Using MonadFix to tie the knot with STM

2011-02-12 Thread Sebastiaan Visser
! tryLookup :: NodeId - Graph (TFix Node) - Node (TFix Node) tryLookup i = fromJust (error msg) . M.lookup i where msg = tieTheKnot: Lookup error, input is an incomplete graph. Thanks in advance, -- Sebastiaan Visser http://www.silkapp.com

Re: [Haskell-cafe] Strong version of 'local' for reader monad

2010-12-13 Thread Sebastiaan Visser
Hey Brent, Of course, because your type signature has no valid implementation, the expected semantics are hard to guess. Why should strongLocal bother about the MonadReader constraint on m1 anyway? Are you internally combining it with 'ask' or another 'local'? The monads are potentially

Re: [Haskell-cafe] ANNOUNCE: arrow-list. List arrows for Haskell.

2010-11-07 Thread Sebastiaan Visser
On Nov 7, 2010, at 1:40 AM, Sebastian Fischer wrote: On Nov 6, 2010, at 10:00 PM, Sebastiaan Visser wrote: List arrows are a powerful tool when processing XML, building query languages and lots of other domains that build on functions that might return more than one value as their output

[Haskell-cafe] ANNOUNCE: arrow-list. List arrows for Haskell.

2010-11-06 Thread Sebastiaan Visser
Hi all, Live from the Hackaton in Ghent, Belgium, I present the first release of the arrow-list[1,2] package. List arrows are a powerful tool when processing XML, building query languages and lots of other domains that build on functions that might return more than one value as their output.

Re: [Haskell-cafe] DSL libraries

2010-11-04 Thread Sebastiaan Visser
Dupont, The `AwesomePrelude' (we apologize for this name) is a very experimental project that is not a workable library or executable at all. You can better consider it to be a `bunch of code' with some interesting ideas and some interesting potential. At least my branch[1] runs on my machine

Re: Who is afraid of arrows, was Re: [Haskell-cafe] ANNOUNCE: Haskell XML Toolbox Version 9.0.0

2010-10-12 Thread Sebastiaan Visser
Gregory, I use arrows (especially list arrows) in a lot of my projects and find them (after some training) easier to work with than monands. Code that I write point-free using arrows generally contains fewer bugs than code I write in monadic style. On Oct 11, 2010, at 8:48 PM, Gregory

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-10 Thread Sebastiaan Visser
Or, when lists had a decent eliminator defined in the Prelude (just like maybe for Maybe and either for Either): list :: b - (a - [a] - b) - [a] - b list d _ [] = d list _ f (x:xs) = f x xs fromList = list [] we could write the alternate function like this: alt :: [a] - [a] alt =

Re: [Haskell-cafe] ANNOUNCE: Agata-0.2.0

2010-04-20 Thread Sebastiaan Visser
Jonas, You can also derive (Co)Arbitrary instances automatically using the regular-extras package based on the Regular generic programming library. The advantage of using a library like Regular is that you do not have to write any Template Haskell code. The library generates a nice algebraic

Re: [Haskell-cafe] Haskell.org re-design

2010-03-29 Thread Sebastiaan Visser
is good, but some of the details make it a bit messy. Gr, -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: Salvia-1.0.0

2010-03-23 Thread Sebastiaan Visser
On Mar 23, 2010, at 12:36 PM, Bas van Dijk wrote: On Sun, Mar 21, 2010 at 5:05 PM, Sebastiaan Visser sfvis...@cs.uu.nl wrote: Straight from Zurihac: I'm very pleased to announce the 1.0.0 release of the Salvia web server. Hoi Sebastiaan, (switching to English) I discovered a major space

[Haskell-cafe] ANN: Salvia-1.0.0

2010-03-21 Thread Sebastiaan Visser
Hi all, Straight from Zurihac: I'm very pleased to announce the 1.0.0 release of the Salvia web server. Salvia is a feature rich web server and web application framework that can be used to write dynamic websites in Haskell. From the lower level protocol code up to the high level application

Re: [Haskell-cafe] Hackage down

2009-10-19 Thread Sebastiaan Visser
machine here which is near impossible without the wonderful Hackage. Thanks, -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: fclabels-0.4.0 - First class accessor labels.

2009-09-09 Thread Sebastiaan Visser
On Sep 8, 2009, at 11:54 PM, Henning Thielemann wrote: On Fri, 4 Sep 2009, Sebastiaan Visser wrote: Hello all, There are more package around that serve the same purpose (like the Lenses package which was uploaded a few days ago), but I'm convinced the simplicity and elegance of fclabels

[Haskell-cafe] ANN: fclabels-0.4.0 - First class accessor labels.

2009-09-04 Thread Sebastiaan Visser
the Lenses package which was uploaded a few days ago), but I'm convinced the simplicity and elegance of fclabels will strike you all. ;-) The package description is included below. Documentation can be found in the package itself or on Hackage. Gr, -- Sebastiaan Visser [1] Hackage: http

Re: [Haskell-cafe] Mapping over multiple values of a list at once?

2009-08-27 Thread Sebastiaan Visser
Or, when the list is infinite, turn it into a some neat but cryptic State computation: avgs = (:) $ ((\d - sum d `div` 3) $ StateT (pure . splitAt 3)) * avgs test = evalState avgs [1,2..] -- Sebastiaan Visser On Aug 27, 2009, at 11:19 AM, Eugene Kirpichov wrote: How about this one

[Haskell-cafe] ANN: jail-0.0.1 - Jailed IO monad

2009-08-27 Thread Sebastiaan Visser
documentation of the jail package is included below. Any comments, suggestions, audits, etc. are welcome! Gr, -- Sebastiaan Visser [1] Source repo: http://github.com/sebastiaanvisser/jail/ [2] Hackage: http://hackage.haskell.org/package/jail Like all of us know, the IO monad from the System.IO

Re: [Haskell-cafe] ANN: jail-0.0.1 - Jailed IO monad

2009-08-27 Thread Sebastiaan Visser
by its type alone. Hope there will once be a nice solution to this... -- Sebastiaan Visser 2009/8/27 Sebastiaan Visser sfvis...@cs.uu.nl: Hi all, I am very pleased to announce the first release of the jail[1,2] package. A jailed IO monad that can restrict filesystem access for your code

Re: [Haskell-cafe] ANN: package Boolean: Generalized booleans

2009-06-30 Thread Sebastiaan Visser
/ Boolean - Conal -- Sebastiaan Visser [1] http://github.com/tomlokhorst/AwesomePrelude/tree/master [2] http://github.com/sebastiaanvisser/frp-js ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell-cafe] Re: BerkeleyDBXML linking problems.

2009-06-30 Thread Sebastiaan Visser
/fastcgi/hpaste.fcgi/view?id=6389#a6389 On Jun 26, 2009, at 12:56 PM, Sebastiaan Visser wrote: Hello all, After manually specifying where to find the appropriate include and library directories for the dbxml distribution, I succeeded to install both the BerkeleyDB and the BerkeleyDBXML

Re: [Haskell-cafe] ANN: package Boolean: Generalized booleans

2009-06-30 Thread Sebastiaan Visser
, - Conal ... -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Nested tests [Code walking off the right edge of the screen]

2009-06-21 Thread Sebastiaan Visser
-- Underestimating the novelty of the future is a time-honored tradition. (D.G.) -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [ANN] Data.Reify.CSE

2009-06-12 Thread Sebastiaan Visser
for optimizing simple compilers for referential transparent domain specific languages. Which is exactly the reason I've written this code. An example of the usage is included in the Haddock documentation. Gr, -- Sebastiaan Visser [1] http://hackage.haskell.org/package/data-reify-cse

Re: [Haskell-cafe] A small puzzle: inTwain as function of foldr

2009-06-04 Thread Sebastiaan Visser
of the standard list folds? Does this help? http://www.brics.dk/RS/02/12/BRICS-RS-02-12.pdf Ganesh And maybe this helps: http://www.springerlink.com/content/h1547h551422462u/ -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Bool as type class to serve EDSLs.

2009-05-28 Thread Sebastiaan Visser
08:46 To: Simon Peyton-Jones; Sebastiaan Visser; Haskell Cafe Cc: Augustsson, Lennart Subject: RE: [Haskell-cafe] Bool as type class to serve EDSLs. There are multiple possible classes that you might want under different circumstances (I think the most interesting issue is whether the class

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Sebastiaan Visser
at 11:33 PM, Tom Hawkins tomahawk...@gmail.com wrote: ... -- Sebastiaan Visser (warning: messy code) [1] http://github.com/sebastiaanvisser/frp-js/blob/b4f37d3b564c4932a3019b9b580e6da9449768a8/src/Core/Compiler.hs ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] I love purity, but it's killing me.

2009-05-27 Thread Sebastiaan Visser
On May 27, 2009, at 12:51 PM, Sittampalam, Ganesh wrote: Sebastiaan Visser wrote: ... But again, I might be missing some important point here. That's exactly right. But it's pretty inconvenient to have your expression tree to blow up exponentially in relation to the code the user actually

[Haskell-cafe] Bool as type class to serve EDSLs.

2009-05-27 Thread Sebastiaan Visser
to this subject? Gr, -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [ANN] multirec-binary

2009-05-25 Thread Sebastiaan Visser
derivation of Data.Binary instances using the MultiRec library. Just try something like this: import Data.Binary import Generics.MultiRec.Base import Generics.MultiRec.Binary instance Binary MyType where put = gput MyFamily get = gget MyFamily Have fun, -- Sebastiaan Visser [1] http

Re: [Haskell-cafe] Writing a compiler in Hakell

2009-05-06 Thread Sebastiaan Visser
in advance Rouan. [1] https://svn.cs.uu.nl:12443/repos/EHC/trunk/EHC/src/ehc/Core/AbsSyn.cag -- Sebastiaan Visser ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] default values in a record structure

2009-04-29 Thread Sebastiaan Visser
On Apr 29, 2009, at 12:18 AM, Luke Palmer wrote: On Tue, Apr 28, 2009 at 4:09 PM, Vasili I. Galchin vigalc...@gmail.com wrote: Hello, Is there anyway when defining a dat type record struct to indicate default values for some of the fields? The usual pattern is to use a default

Re: [Haskell-cafe] ANN: Cute Hack - Hyena handler + Bamboo Blog Engine :)

2009-04-25 Thread Sebastiaan Visser
What kind of port is this? Direct translation from ruby source? I see that you are using the (.) for OO-style reversed function application. Which feels a bit weird at first sight. Snippet from your Hack.Handler.Kibro: handle app = do env - get_env response - app env .liftIO -- set

Re: [Haskell-cafe] CPS and the product function

2009-04-20 Thread Sebastiaan Visser
On Apr 20, 2009, at 4:32 PM, michael rice wrote: Hi Eugene, Clever solution. It didn't come right back so I interrupted it. Guess it would do all those multiplies by zero. Does anyone know how to define it to avoid that? Thanks. Michael --- On Mon, 4/20/09, Eugene Kirpichov

Re: [Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) -- first release

2009-04-20 Thread Sebastiaan Visser
On Apr 20, 2009, at 5:44 PM, David Leimbach wrote: On Mon, Apr 20, 2009 at 8:38 AM, Malcolm Wallace malcolm.wall...@cs.york.ac.uk wrote: Just refuse to use UHC until it conforms. Do you not use Hugs for the same reason? Not to mention that GHC does not comply with the H'98 standard either:

Re: [Haskell-cafe] [ANN] salvia-0.1, salvia-extras-0.1

2009-04-01 Thread Sebastiaan Visser
version of Orchid coming along? On 3/22/09, Sebastiaan Visser sfvis...@cs.uu.nl wrote: Hi all, I am pleased to announce a new version of Salvia, the lightweight Haskell Web Server Framework with modular support for serving static files, directories indices, default error responses, connection

Re: [Haskell-cafe] [SoC] XML Schema Implementation

2009-03-31 Thread Sebastiaan Visser
Vlad, Some time ago I wrote a generic Haskell data type to XML/XSD library[1]. It was based on an old singleton version of the multirec[2] generic programming library. I never released any of it because it is not really usable in a serious setting but you might want to look at it for

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-30 Thread Sebastiaan Visser
On Mar 30, 2009, at 3:30 PM, Bas van Dijk wrote: On Sun, Mar 29, 2009 at 11:16 AM, Lennart Augustsson lenn...@augustsson.net wrote: I've uploaded my CMonad package to Hackage. It allows you to write Haskell code in a C style. Nice! A nice addition would be to output a C AST from language-c:

Re: [Haskell-cafe] The votes are in!

2009-03-24 Thread Sebastiaan Visser
Well done! Although I am quite happy with the result, this was definitely my favorite, this logo is not really 'finished'. Is there going to be some kind of second round in which we can vote for/suggest variations of this logo? With different texts/fonts/colors/ etc? Gr, Sebastiaan On

[Haskell-cafe] Hackage upload problems?

2009-03-23 Thread Sebastiaan Visser
Hello, Currently I'm trying to upload a minor update of Salvia to Hackage to fix some dependency issues but Hackage times out all the time? Both the CLI tool and the web-interface do not react to my upload request. Any known problems here? Gr, Sebastiaan.

[Haskell-cafe] [ANN] salvia-0.1, salvia-extras-0.1

2009-03-22 Thread Sebastiaan Visser
Hi all, I am pleased to announce a new version of Salvia, the lightweight Haskell Web Server Framework with modular support for serving static files, directories indices, default error responses, connection counting and logging, HEAD and PUT requests, keep-alives, custom banner printing,

[Haskell-cafe] Memoizing partially evaluated computations.

2009-03-18 Thread Sebastiaan Visser
Suppose I have a list of IO computations that depends on a few very time consuming pure operations. The pure operations are not dependent on the real world: computation :: [IO Int] computation = [ smallIOfunc timeConsumingPureOperation0 , smallIOfunc timeConsumingPureOperation1

Re: [Haskell-cafe] Memoizing partially evaluated computations.

2009-03-18 Thread Sebastiaan Visser
On Mar 18, 2009, at 12:06 PM, minh thu wrote: 2009/3/18 Sebastiaan Visser sfvis...@cs.uu.nl: Suppose I have a list of IO computations that depends on a few very time consuming pure operations. The pure operations are not dependent on the real world: computation :: [IO Int] computation

[Haskell-cafe] ANNOUNCE: haha-0.1 - Animated ascii lambda

2009-02-14 Thread Sebastiaan Visser
Always wanted to have an full-color rotating vector based ascii art lambda on your terminal? This is your chance, installing `haha' will do the trick! This is very minimal vector based ascii art library written just for fun. There is a sample program called `rotating-lambda' which does

[Haskell-cafe] ANN: orchid-0.0.7

2009-01-24 Thread Sebastiaan Visser
I am pleased to announce a new release of Orchid, just another Haskell Wiki. Some new features/fixes: * Attached wiki to FileStore package which means we now also have Git backend. * Orchid-demo now has a flag which allows user to choose Git or Darcs. * Searching document is now

[Haskell-cafe] [ANN] Haskell web server + wiki: salvia-0.0.4 + orchid-0.0.6

2009-01-01 Thread Sebastiaan Visser
Happy new year, you all! I'm pleased to announce three new packages on Hackage: * salvia-0.0.4: A lightweight modular web server framework. * orchid-0.0.6: A(nother) Wiki written in Haskell, currently using Darcs as a versioning back-end and Salvia as the application server. Orchid

Re: [Haskell-cafe] [ANN] Haskell web server + wiki: salvia-0.0.4 + orchid-0.0.6

2009-01-01 Thread Sebastiaan Visser
On Jan 1, 2009, at 7:15 PM, Gwern Branwen wrote: On Thu, Jan 1, 2009 at 9:04 AM, Sebastiaan Visser wrote: Happy new year, you all! I'm pleased to announce three new packages on Hackage: ... Miscellaneous comments: 1) You're right about cabal-install versus runhaskell etc. There seems

Re: [Haskell-cafe] Verifying a list of properties using QuickCheck

2008-10-22 Thread Sebastiaan Visser
On Oct 22, 2008, at 1:03 PM, Martijn van Steenbergen wrote: Thomas van Noort wrote: However, I would like a single result for the complete list of properties instead of a result for each property. I realize that this restricts the properties to be of the same type, but that isn't a

Re: [Haskell-cafe] Is there already an abstraction for this?

2008-09-23 Thread Sebastiaan Visser
This (recent) paper describes a very interesting way to perform generic term rewriting: http://www.cs.uu.nl/research/techreps/repo/CS-2008/2008-020.pdf On Sep 23, 2008, at 3:46 AM, Jeremy Shaw wrote: Hello, I am trying to figure out if there is an existing abstraction I am missing here. I

Re: [Haskell-cafe] Bit streams

2008-06-18 Thread Sebastiaan Visser
On Jun 17, 2008, at 10:05 PM, Andrew Coppin wrote: OK, so today I tried to write my first program using the Binary library. And I've hit a snag: It appears the library will only handle data that is byte-aligned. So if I try to write three Bool values, it uses three bytes, not three bits.

Re: [Haskell-cafe] Polymorphic QuickCheck arguments

2008-06-17 Thread Sebastiaan Visser
On Jun 17, 2008, at 11:53 AM, Hugo Pacheco wrote: Hi all, There is something about polymorphic tests in QuickCheck that I do not understand. If you write the simplest dummy test function tst :: a - Bool tst _ = True and evaluate it we get verboseCheck tst 0: () 1: () ... How come did

Re: [Haskell-cafe] Lazy IO.

2008-06-16 Thread Sebastiaan Visser
On Jun 16, 2008, at 2:58 PM, Jules Bean wrote: Sebastiaan Visser wrote: Does anyone know a pattern in which I can do this easily? Don't use hGetContents on a socket. That's asking for trouble. Can you please explain why? What is a more easier method to spool your HTTP post data to a file

[Haskell-cafe] Lazy IO.

2008-06-14 Thread Sebastiaan Visser
Hi, I've got a question about lazy IO in Haskell. The most well known function to do lazy IO is the `hGetContents', which lazily reads all the contents from a handle and returns this as a regular [Char]. The thing with hGetContents is that is puts the Handle in a semi-closed state, no one can

Re: [Haskell-cafe] const is question

2008-06-14 Thread Sebastiaan Visser
On Jun 14, 2008, at 6:14 PM, odtaa48 wrote: hello could someone explain the following differing results const id 0 5 - 5 -- ie. 'takes' the 'last' one const (id 0) 5 - 0 -- ie. 'takes' the 'first' one Thanks You can easily see what is happening by rewriting the equations step by step.

Re: [Haskell-cafe] Lazy IO.

2008-06-14 Thread Sebastiaan Visser
On Jun 14, 2008, at 6:45 PM, Felipe Lessa wrote: (Sorry, Sebastiaan, I hit send accidentally) On Sat, Jun 14, 2008 at 1:18 PM, Sebastiaan Visser [EMAIL PROTECTED] wrote: readHttpMessage :: IO (Headers, Data.ByteString.Lazy.ByteString) readHttpMessage = do myStream - accept http

Re: [Haskell-cafe] Lazy IO.

2008-06-14 Thread Sebastiaan Visser
On Jun 14, 2008, at 6:49 PM, Isaac Dupree wrote: Sebastiaan Visser wrote: Hi, I've got a question about lazy IO in Haskell. The most well known function to do lazy IO is the `hGetContents', which lazily reads all the contents from a handle and returns this as a regular [Char]. The thing

Re: [Haskell-cafe] Lazy IO.

2008-06-14 Thread Sebastiaan Visser
On Jun 14, 2008, at 7:16 PM, Felipe Lessa wrote: On Sat, Jun 14, 2008 at 1:50 PM, Sebastiaan Visser [EMAIL PROTECTED] wrote: Doesn't this imply that the parseHttpHeader must work on ByteStrings instead of regular Strings? I made the change because it's easier and faster to go from