[Haskell-cafe] how do i resolve these screwy cabal errors

2010-11-15 Thread Anatoly Yakovenko
package derive-2.3.0.2-ad85bd58710fede3f840a467e84c403e is unusable due to missing or recursive dependencies: haskell-src-exts-1.9.4-e0f8c55bea9fc97376aa3598dfdca6d6 package derive-2.4.1-415d44d2f93198aab5dff67866c17b64 is unusable due to missing or recursive dependencies:

Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-15 Thread Brent Yorgey
On Fri, Nov 12, 2010 at 03:56:26PM -0800, Michael Litchard wrote: I've been working on a project that requires me to do screen scraping. When I first started this, I worked off of other people's examples. Not one used regex. By luck I found someone at work to help me along this project. His

[Haskell-cafe] Curious data family bug

2010-11-15 Thread Michael Snoyman
Hey all, While trying to get a commit pushed for Yesod[1], Alexander Dunlap pointed out one of his programs didn't work with the new code. After some investigation, I was able to reproduce the bug with the following code snippet: {-# LANGUAGE TypeFamilies #-} data family Foo a data Bar = Bar

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-15 Thread Richard O'Keefe
On 13/11/2010, at 9:33 AM, Malcolm Wallace wrote: On 12 Nov 2010, at 20:21, Andrew Coppin wrote: On 11/11/2010 08:43 PM, Richard O'Keefe wrote: If length, map, and so on had always been part of a Sequence typeclass, people would not now be talking about It's always puzzled me that

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-15 Thread Henning Thielemann
Yves Parès schrieb: I think this idea is a stairway to duck typing. I exagerate, of course, but here is my point: It shouldn't be difficult to make a class: class HasName a where name :: a - String or class Name a where name :: Accessor a String That gives you read and write access

[Haskell-cafe] Concurrent with monads

2010-11-15 Thread Jiansen He
Hi cafe, I wounder if it is possible to tell a haskell system that two computations with side effects could be executed concurrently. Here is an affected example: Suppose two people want to compare their age, but do not want to leak their personal information. The following program reads one

[Haskell-cafe] Re: how do i resolve these screwy cabal errors

2010-11-15 Thread Anatoly Yakovenko
i reinstalled cabal and reinstalled derive package and that fixed it. On Sun, Nov 14, 2010 at 1:40 AM, Anatoly Yakovenko aeyakove...@gmail.com wrote: package derive-2.3.0.2-ad85bd58710fede3f840a467e84c403e is unusable due to missing or recursive dependencies:  

Re: [Haskell-cafe] Curious data family bug

2010-11-15 Thread Daniel Peebles
Hmm, strange. I have a project that uses data families with dozens of constructors per clause/instantiation of the type function. I use GADT syntax to define them though as they also refine one of the parameter type variables. Never had any issues with it, although I haven't tried building that

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-15 Thread Richard O'Keefe
On 12/11/2010, at 6:06 PM, Sebastian Fischer wrote: As others have pointed out, type classes are insufficient for overloading record labels because they do not cover record updates. How can we add a special kind of overloading for record labels that also works for updates? Maybe like

Re: [Haskell-cafe] Compiler constraints in cabal

2010-11-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/6/10 23:09 , wren ng thornton wrote: On 11/6/10 6:20 AM, Reiner Pope wrote: I was aware of this condition, but I'm not precisely sure it addresses my requirements. When you run cabal install some-package, cabal reads all version constraints

Re: [Haskell-cafe] Re: ANNOUNCE zeno 0.1.0

2010-11-15 Thread Luke Palmer
Oops. It's right there on the site. My eyes skipped over it for some reason. On Sat, Nov 13, 2010 at 2:11 PM, Luke Palmer lrpal...@gmail.com wrote: Is the source code public, so I can run it on my own machine? Luke Hi all, My masters project Zeno was recently mentioned on this mailing

Re: [Haskell-cafe] Re: ANNOUNCE zeno 0.1.0

2010-11-15 Thread Will Sonnex
However: You can express a property such as takeWhile p xs ++ dropWhile p xs === xs and it will prove it to be true for all values of p :: a - Bool and xs :: [a], over all types a, using only the function definitions. That is surprising, given that this property does not seem to be true

[Haskell-cafe] [ANN] shpider-0.1.1

2010-11-15 Thread John Morrice
Shpider is a web automation library for Haskell. It allows you to quickly write crawlers, and for simple cases ( like following links ) even without reading the page source. Shpider is on hackage at http://hackage.haskell.org/package/shpider Shpider development repository is now on github at

Re: [Haskell-cafe] a problem about Regex in Real World Haskell

2010-11-15 Thread wolf python london
On 13 November 2010 21:46, Daniel Fischer daniel.is.fisc...@web.de wrote: On Saturday 13 November 2010 03:26:46, wolf python london wrote: hi ,folks , I'm a newbie of haskell  and learn haskell using the textbook Real World Haskell. in the page 201, ghci good food =~ .ood :: [String]

Re: [Haskell-cafe] a problem about Regex in Real World Haskell

2010-11-15 Thread Daniel Fischer
On Saturday 13 November 2010 03:26:46, wolf python london wrote: hi ,folks , I'm a newbie of haskell and learn haskell using the textbook Real World Haskell. in the page 201, ghci good food =~ .ood :: [String] Should be good food =~ .ood :: [[String]] I think. I don't know if it was an

RE: [Haskell-cafe] Curious data family bug

2010-11-15 Thread Simon Peyton-Jones
Hmm. It works with HEAD (and hence I believe with the 7.0.1 RC2). It looks similar to http://hackage.haskell.org/trac/ghc/ticket/4174, which is fixed. Anyway I've added it as a regression test, so it should never go wrong again. Thanks for mentioning it. Simon | -Original Message-

[Haskell-cafe] Encoding problem (?)

2010-11-15 Thread llama
Hello, I have this strange problem, with the same program (simple) behaving differently when run from console and from WinGHCi. Platform is Windows XP. Haskell Platform 2.0.0. The program : import IO import Data.Maybe tfind s = lookup (head s) $ zip \232\222 12 main = do h -

[Haskell-cafe] HUnit Control.Exception assertFailure?

2010-11-15 Thread Mark Spezzano
Hi, I'm trying to follow some examples of HUnit from a webpage. Basically I want my _application_ code to call the error function when a certain condition is met (namely when a supplied String to a function is longer than 80 characters). I want my _test_ code to catch this error.

[Haskell-cafe] date parsing and formatting

2010-11-15 Thread Alex Baranosky
I've been working with Haskell's Date.Time modules to parse a date like 12-4-1999 or 1-31-1999. I tried: parseDay :: String - Day parseDay s = readTime defaultTimeLocale %m%d%Y s And I think it wants my months and days to have exactly two digits instead of 1 or 2... What's the proper way to do

[Haskell-cafe] Ralf Laemmel's riddle on surviving without the monad transformation library

2010-11-15 Thread C K Kashyap
Hi, Can someone provide me the solution to the following riddle that Ralf asked in his lecture at http://channel9.msdn.com/Shows/Going+Deep/C9-Lectures-Dr-Ralf-Lmmel-Advanced-Functional-Programming-Evolution-of-an-Interpreter Riddle: define a custom made monad (only involving (-) and Either

[Haskell-cafe] Encoding problem (?)

2010-11-15 Thread Bruno Damour
Hello, I have this strange problem, with the same program (simple) behaving differently when run from console and from WinGHCi. Platform is Windows XP. Haskell Platform 2.0.0. The program : import IO import Data.Maybe tfind s = lookup (head s) $ zip \232\222 12 main = do h -

Re: [Haskell-cafe] Re: dynamic loading of code on windows

2010-11-15 Thread Arnaud Bailly
Hello again, So I followed Kevin's suggestion and installed MinGW along with gcc and autoconf tools needed by hs-plugins. Then it failed with the following error: $ cabal install --enable-documentation plugins Resolving dependencies... Configuring plugins-1.5.1.4... checking build system type...

Re: [Haskell-cafe] Printing of asynchronous exceptions to stderr

2010-11-15 Thread Bit Connor
On Wed, Nov 10, 2010 at 5:48 PM, Simon Marlow marlo...@gmail.com wrote: [...] So we should say there are a few things that you can do that guarantee not to call any interruptible operations:  - IORef operations  - STM transactions that do not use retry  - everything from the Foreign.*

[Haskell-cafe] [ANNOUNCE] Parallel Haskell project underway

2010-11-15 Thread Dmitry Astapov
Parallel Haskell project underway GHC HQ and Well-Typed are pleased to report that work has started on the MSR-funded project to push the real-world use of parallel Haskell. We will be working with four industrial partners over the next two years, with the aim of demonstrating that parallel

Re: [Haskell-cafe] date parsing and formatting

2010-11-15 Thread Anthony Cowley
On Sat, Nov 13, 2010 at 4:35 PM, Alex Baranosky alexander.barano...@gmail.com wrote: I've been working with Haskell's Date.Time modules to parse a date like 12-4-1999 or 1-31-1999. I tried: parseDay :: String - Day parseDay s = readTime defaultTimeLocale %m%d%Y s And I think it wants my

[Haskell-cafe] Type-Directed Name Resolution for Records?

2010-11-15 Thread John Smith
Two significant points which have emerged from the TDNR thread are: -The wiki page combines two orthogonal proposals: type-directed name resolution, which requires no special syntax, and the x.f syntax, which does not require TDNR. -Implementing both proposals may be a desired fix for the

Re: [Haskell-cafe] Curious data family bug

2010-11-15 Thread Michael Snoyman
Sorry, I forgot to mention which compiler I was working with: 6.12.3. I'm glad to hear it's working with 7. Michael On Mon, Nov 15, 2010 at 4:58 PM, Simon Peyton-Jones simo...@microsoft.com wrote: Hmm.  It works with HEAD (and hence I believe with the 7.0.1 RC2).  It looks similar to

Re: [Haskell-cafe] [ANNOUNCE] Parallel Haskell project underway

2010-11-15 Thread Neil Brown
On 15/11/10 15:23, Dmitry Astapov wrote: == Dragonfly == http://www.dragonfly.co.nz/ Participants: Finlay Thompson, Edward Abraham Cloudy Bayes: Hierarchical Bayesian modeling in Haskell The Cloudy Bayes project aims to develop a fast Bayesian model fitter that takes advantage of

[Haskell-cafe] http://www.haskell.org/ is down !

2010-11-15 Thread Pasqualino Titto Assini
Hi, is haskell.org being updated or, as I fear, Haskell's HQ has been overrun by a mob of PHPers ? If so, I am ready to fight ! titto P.S. Just need to find my Excalibur, oh god, the wife just sent it to the Dry Cleaner. -- Pasqualino Titto Assini, Ph.D. http://quid2.org/

[Haskell-cafe] Opportunity: Spring semester internship on Haskell project at Intel

2010-11-15 Thread Ryan Newton
Dear Haskellers, We're looking for outstanding candidates for an internship in Spring 2011. The internship will be in a suburb of Boston (Hudson, MA). Graduate students and talented undergraduates are welcome to apply, but time is a bit short. We are a small research group run directly by the

Re: [Haskell-Cafe] Parsing bytestream

2010-11-15 Thread C K Kashyap
Hi Felipe, On Tue, Nov 9, 2010 at 3:53 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Tue, Nov 9, 2010 at 8:10 AM, C K Kashyap ckkash...@gmail.com wrote: ] I think I can restate my problem like this --- ] ] If I have a list of actions as follows - ] ] import Data.Word ] import

[Haskell-cafe] Updating Haskell Packages through Archlinux becoming A Pain

2010-11-15 Thread Mathew de Detrich
Well basically, I haven't update my Haskell libraries for some time now (around a month) so when I finally got around to updating my Haskell packages (which are installed through Archlinux's AUR) my GHC installation broke (again). This has been happening for some time now (I have been having this

Re: [Haskell-cafe] Re: ANNOUNCE zeno 0.1.0

2010-11-15 Thread Luke Palmer
Is the source code public, so I can run it on my own machine? Luke Hi all, My masters project Zeno was recently mentioned on this mailing list so I thought I'd announce that I've just finished a major update to it, bringing it slightly closer to being something useful. Zeno is a fully

[Haskell-cafe] Re: [Haskell] intent-typing

2010-11-15 Thread Max Rabkin
I still don't understand what intent typing is, but this particular problem is discussed (with a type-based, statically checked solution) at http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem --Max On Mon, Nov 15, 2010 at 17:17, Marcus Sundman

[Haskell-cafe] Re: Opportunity: Spring semester internship on Haskell project at Intel

2010-11-15 Thread Ryan Newton
Update: The job requisition number is 584943. You can submit your full application here: https://intel.taleo.net/careersection/1/jobdetail.ftl?lang=enctx=1job=584943 Please include a cover-letter explaining why you are great for this job. Cheers, -Ryan P.S. It looks like one link below

Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-15 Thread Neil Mitchell
I've been working on a project that requires me to do screen scraping. If you are screen scraping HTML I think tagsoup is a very good choice. The use of tagsoup means that you have a real HTML 5 compliant parser underneath, and then you can use whatever technique you wish to split up the page

[Haskell-cafe] Re: Updating Haskell Packages through Archlinux becoming A Pain

2010-11-15 Thread Mathew de Detrich
This is an example of what happens Proceed with installation? [Y/n] Y checking package integrity... (1/1) checking for file conflicts [##] 100% ghc-pkg: unregistering gio-0.11.1 would break the following packages: ltk-0.8.0.8 gtksourceview2-0.12.1 gtk-0.11.2 (use

[Haskell-cafe] Error handling with safer-file-handling

2010-11-15 Thread Florian Weimer
How am I supposed to write an exception handle for an invocation of System.IO.SaferFileHandles.openFile? Currently, I have got this: case req of Open path - do handle -openFile (asAbsPath path) ReadMode liftIO $ forcePut result Success run handle Follwing

Re: Better Records was Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-15 Thread Erik Hesselink
On Fri, Nov 12, 2010 at 22:48, Jonathan Geddes geddes.jonat...@gmail.com wrote: Records do leave quite a bit to be desired. But does anybody actually have a concrete alternative proposal yet? A few months ago I proposed a couple of extensions [1] on -cafe. [snip]  Consider what this would

Re: [Haskell-cafe] Concurrent with monads

2010-11-15 Thread John Lato
From: Jiansen He jianse...@googlemail.com Hi cafe, I wounder if it is possible to tell a haskell system that two computations with side effects could be executed concurrently. Here is an affected example: Suppose two people want to compare their age, but do not want to leak their

Re: [Haskell-cafe] xml packages

2010-11-15 Thread Neil Mitchell
First question. As I saw in sources, both hxt and haxml uses [Char]'s. this is very inefficient. I want to know, does any effective parser for haskell, written in haskell, exists. The TagSoup parser can generate ByteString syntax trees - but they're quite a bit slower than [Char] versions. I

[Haskell-cafe] Making monadic code more concise

2010-11-15 Thread Ling Yang
Hi, I'm fairly new to Haskell and recently came across some programming tricks for reducing monadic overhead, and am wondering what higher-level concepts they map to. It would be great to get some pointers to related work. Background: I'm a graduate student whose research interests include

Re: [Haskell-cafe] RegEx versus (Parsec, TagSoup, others...)

2010-11-15 Thread Christopher Done
On 13 November 2010 16:46, Neil Mitchell ndmitch...@gmail.com wrote: I've been working on a project that requires me to do screen scraping. If you are screen scraping HTML I think tagsoup is a very good choice. The use of tagsoup means that you have a real HTML 5 compliant parser underneath,

[Haskell-cafe] Making HList's field access operators (#) and (.!.) left-associative?

2010-11-15 Thread Josh Triplett
Hello, In experimenting with HList's very impressive extensible records, I discovered that the field access operators (#) and (.!.) have right associativity; this means I can't write (r # f1 # f2) to access field f2 of the record stored in field f1 of r. If (#) and (.!) had left-associativity

Re: [Haskell-cafe] http://www.haskell.org/ is down !

2010-11-15 Thread Christopher Done
On 13 November 2010 20:16, Pasqualino Titto Assini tittoass...@gmail.com wrote: is haskell.org being updated or It's back up now. As far as I'm aware, it is being updated. But I'm not sure on the progress of it and whether the server transfer is related. If so, I am ready to fight ! Lambda

[Haskell-cafe] Re: ANNOUNCE zeno 0.1.0

2010-11-15 Thread Will Sonnex
I was wondering, Zeno capable of proving just equational statements, or is it able to prove more general statements about programs? In particular, it would be interesting if Zeno would be able to prove that a function is total by verifying that it uses only structural (inductive) recursion (on

[Haskell-cafe] Is there any way to prevent a computation from being shared?

2010-11-15 Thread Petr Prokhorenkov
I've came upon very a strange situation with memory consumption. The smallest test case I've been able to come up with is the following: import Data.List wtf d = head . dropWhile ( 10^100) . map (*d) $ enumFrom 2 main = do print $ wtf 1 print $ wtf 2 -- Everything is ok without this

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread Alexander Solla
On Nov 15, 2010, at 9:43 AM, Ling Yang wrote: Specifically: There are some DSLs that can be largely expressed as monads, that inherently play nicely with expressions on non-monadic values. This, to me, is a big hint that applicative functors could be useful. Every monad is an

[Haskell-cafe] Announcement: the Haskell.org committee has formed

2010-11-15 Thread Don Stewart
= The haskell.org committee has formed = http://haskellorg.wordpress.com/2010/11/15/the-haskell-org-committee-has-formed/ In recent years, haskell.org has started to receive assets, e.g. Google Summer Of Code funds, donations for Hackathons, and a Sparc machine for use in GHC development. We

Re: [Haskell-cafe] Is there any way to prevent a computation from being shared?

2010-11-15 Thread Felipe Almeida Lessa
On Sat, Nov 13, 2010 at 2:55 PM, Petr Prokhorenkov prokhoren...@gmail.com wrote: Is there any way to overcome this? You can add {-# NOINLINE wtf #-} That will prevent the sharing. But I'm not sure if this is the best solution. Cheers, -- Felipe.

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
Hi! On Mon, Nov 8, 2010 at 1:50 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: (I won't answer your main question, I'll just write some notes on your current code.) Thanks. This also helped. But is it possible to define a Monad like I described? So that all actions would be wrapped in

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Felipe Almeida Lessa
Well, I guess you could try something like: {-# LANGUAGE GADTs #-} import Control.Exception (bracketOnError) import Control.Monad ((=)) -- from package 'operational' import Control.Monad.Operational data BracketedOperation a where Bracketed :: IO a - (a - IO b) - BracketedOperation a

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread C. McCann
On Mon, Nov 15, 2010 at 12:43 PM, Ling Yang ly...@cs.stanford.edu wrote: Specifically: There are some DSLs that can be largely expressed as monads, that inherently play nicely with expressions on non-monadic values. We'd like to use the functions that already work on the non-monadic values for

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Bas van Dijk
On Mon, Nov 8, 2010 at 1:40 AM, Mitar mmi...@gmail.com wrote: Hi! I have a class Neuron which has (among others) two functions: attach and deattach. I would like to make a way to call a list/stack/bunch of attach functions in a way that if any of those fail (by exception), deattach for

[Haskell-cafe] Making monadic code more concise

2010-11-15 Thread lyang
This, to me, is a big hint that applicative functors could be useful. Indeed, the ideas here also apply to applicative functors; it is just the lifting primitives that will be different; instead of having liftMN, we can use $ and * to lift the functions. We could have done this for Num and

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread Ling Yang
See my reply to Alex's post for my perspective on how this relates to applicative functors, reproduced here: This, to me, is a big hint that applicative functors could be useful. Indeed, the ideas here also apply to applicative functors; it is just the lifting primitives that will be

[Haskell-cafe] Hood on Hackage is an interesting way to see intermediate data structures.

2010-11-15 Thread caseyh
Hood on Hackage is an interesting way to see intermediate data structures. {-# LANGUAGE NoMonomorphismRestriction #-} -- Fold Behaviour Observed module Folding where -- See Hood on Hackage import Observe import Data.List n = 10::Int fr = foldr (observe Add (+)) 0 [1..n]

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread C. McCann
On Sun, Nov 7, 2010 at 7:40 PM, Mitar mmi...@gmail.com wrote: I have a class Neuron which has (among others) two functions: attach and deattach. I would like to make a way to call a list/stack/bunch of attach functions in a way that if any of those fail (by exception), deattach for previously

Re: [Haskell-cafe] Is there any way to prevent a computation from being shared?

2010-11-15 Thread Brian Bloniarz
On 11/13/2010 08:55 AM, Petr Prokhorenkov wrote: import Data.List wtf d = head . dropWhile ( 10^100) . map (*d) $ enumFrom 2 main = do print $ wtf 1 print $ wtf 2 -- Everything is ok without this line Is there any way to overcome this? I think this phenomenon is called the full

Re: [Haskell-cafe] Concurrent with monads

2010-11-15 Thread Mario Blažević
On 10-11-14 07:36 PM, Jiansen He wrote: Hi cafe, I wounder if it is possible to tell a haskell system that two computations with side effects could be executed concurrently. Here is an affected example: Suppose two people want to compare their age, but do not want to leak their personal

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread Bas van Dijk
On Mon, Nov 15, 2010 at 6:43 PM, Ling Yang ly...@cs.stanford.edu wrote: ... One alternate way of doing this, however, is instancing the typeclasses of the ordinary values with their monadic versions: instance (Num a) = Num (Prob a) where        (+) = liftM2 (+)        (*) = liftM2 (*)      

Re: [Haskell-cafe] Making monadic code more concise

2010-11-15 Thread Alberto G. Corona
I like your autolifting stuff, and the runnable concept. 2010/11/15 Ling Yang ly...@cs.stanford.edu See my reply to Alex's post for my perspective on how this relates to applicative functors, reproduced here: This, to me, is a big hint that applicative functors could be useful. Indeed,

Re: [Haskell-cafe] Ralf Laemmel's riddle on surviving without the monad transformation library

2010-11-15 Thread Luke Palmer
I haven't watched the lecture. But what does he mean survive? Does it mean to do anything that you can do with mtl? On Mon, Nov 15, 2010 at 12:53 AM, C K Kashyap ckkash...@gmail.com wrote: Hi, Can someone provide me the solution to the following riddle that Ralf asked in his lecture at

Re: [Haskell-cafe] Error handling with safer-file-handling

2010-11-15 Thread Bas van Dijk
On Sun, Nov 14, 2010 at 12:38 PM, Florian Weimer f...@deneb.enyo.de wrote: How am I supposed to write an exception handle for an invocation of System.IO.SaferFileHandles.openFile? Currently, I have got this:  case req of    Open path - do      handle -openFile (asAbsPath path) ReadMode    

Re: [Haskell-cafe] Re: dynamic loading of code on windows

2010-11-15 Thread Mathias Weber
Hello Arnaud, I also faced this problem with the plugins package. This particular error comes from the backslashes in the ghc library directory not being escaped. But even after patching this, I had trouble with missing imports and some other stuff. It seams that this package is not much

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
Hi! On Mon, Nov 15, 2010 at 9:07 PM, C. McCann c...@uptoisomorphism.net wrote: Isn't this mostly a reimplementation of mapM? Given a list of [IO Growable], you map over it to put a bracket around each one, then sequence the result No. There is a trick. It stacks up attach and deattach. So if

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
Hi! Felipe and Bas, thank you for your suggestions. They really opened two new worlds to me. ;-) I didn't know about those libraries. I was hopping of succeeding making a bracketing monad by hand, to learn something and to make my first monad. But was not successful. I hope those approaches with

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Felipe Almeida Lessa
On Mon, Nov 15, 2010 at 9:44 PM, Mitar mmi...@gmail.com wrote: I was hopping of succeeding making a bracketing monad by hand, to learn something and to make my first monad. But was not successful. I hope those approaches with libraries will be a good guide to me. My approach using

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Mitar
Hi! My approach using 'operational' package is equivalent to creating your own monad.  The beauty of 'operational' is that you don't need to worry about the pumbling of the monad, you just need to specify what to do with your operations. True. Approach with operational is really beautiful.

Re: [Haskell-cafe] Is there any way to prevent a computation from being shared?

2010-11-15 Thread Petr Prokhorenkov
On Mon, Nov 15, 2010 at 11:27 PM, Brian Bloniarz brian.bloni...@gmail.com wrote: So I think you're seeing bug http://hackage.haskell.org/trac/ghc/ticket/917 where the increased sharing only leads to space leaks. You could try the workaround, passing -fno-full-laziness (it might need to come

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Felipe Almeida Lessa
On Mon, Nov 15, 2010 at 10:15 PM, Mitar mmi...@gmail.com wrote: True. Approach with operational is really beautiful. And it is really great when you want things done. But for me, Haskell novice who wants to learn more, it hides too much. So it is probably something I would use in my code, but

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Alexander Solla
On Nov 15, 2010, at 4:15 PM, Mitar wrote: True. Approach with operational is really beautiful. And it is really great when you want things done. But for me, Haskell novice who wants to learn more, it hides too much. So it is probably something I would use in my code, but on the other hand I

Re: [Haskell-cafe] Bracket around every IO computation monad

2010-11-15 Thread Bas van Dijk
On Tue, Nov 16, 2010 at 12:50 AM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: That said, I don't know what 'regions' may do for you that the simple monad I presented doesn't.  Bas, what are the advantages? My suggestion to use regions is based on an assumption which I'm not sure is

Re: [Haskell-cafe] Ralf Laemmel's riddle on surviving without the monad transformation library

2010-11-15 Thread C K Kashyap
On Tue, Nov 16, 2010 at 3:58 AM, Luke Palmer lrpal...@gmail.com wrote: I haven't watched the lecture.  But what does he mean survive?  Does it mean to do anything that you can do with mtl? Yes ... to understand monad transformers better, he suggested trying to wrap a monad inside another (I am

[Haskell-cafe] typeclass namespace rational?

2010-11-15 Thread Jonathan Geddes
cafe, Data Constructors and Type Constructors don't share the same namespace. You see code like the following all the time: data MyRecord = MyRecord {...} This is possible because Data Constructors are used in different parts of the code than Type Constructors so there's never any ambiguity.

[Haskell-cafe] Re: typeclass namespace rational?

2010-11-15 Thread Jonathan Geddes
2 seconds after sending I realized the issue is in module exports: Module String where (String(..)) is that exporting some concrete ADT with all of its constructors or an abstract type class with all of its methods? Its too bad that Classes and ADTs overlap in export syntax and as such must

Re: [Haskell-cafe] Error installing hp2any-graph on Snow Leopard

2010-11-15 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/8/10 04:52 , Ivan Lazar Miljenovic wrote: I'm not sure how MacPorts does packaging, so you may require to install a -dev or development version of glut to get the relevant headers and library files. MacPorts always builds from source, so

Re: [Haskell-cafe] Re: dynamic loading of code on windows

2010-11-15 Thread Arnaud Bailly
OK, here is a short summary: - installed MinGW + GCC 4.5 toolchain - downloaded latest code from darcs - Run ./Setup.lhs configure - got another failure Setup.lhs:2:2: Warning: In the use of `defaultUserHooks' (imported from Distribution.Simple): Deprecated: Use

Re: [Haskell-cafe] Re: Updating Haskell Packages through Archlinux becoming A Pain

2010-11-15 Thread James Sanders
Personally I gave up on installing haskell packages through AUR, I pretty much stick to Cabal now. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: typeclass namespace rational?

2010-11-15 Thread Daniel Peebles
If I were to guess, I'd say it's because there are two major spaces in Haskell, the type level and the value level. They never interact directly (their terms are never juxtaposed) so there's not much chance for confusion. Typeclass constructors and type constructors do however live in the same

Re: [Haskell-cafe] Re: Updating Haskell Packages through Archlinux becoming A Pain

2010-11-15 Thread Mathew de Detrich
Yeah I used to do that as well, but then that kind of fails on packages that provides both libraries and binaries (and other issues as well) On 16/11/2010 4:53 PM, James Sanders jimmyjaz...@gmail.com wrote: Personally I gave up on installing haskell packages through AUR, I pretty much stick to

Re: [Haskell-cafe] Quasiquoter invocation no longer requires/allows a leading dollar sign.

2010-11-15 Thread Michael Snoyman
I'm guessing this did *not* make it into 7.0.1, correct? Is there still a chance that it will be in 7.0.2, and therefore the next HP release? Michael On Fri, Nov 12, 2010 at 10:38 AM, Simon Peyton-Jones simo...@microsoft.com wrote: Good point. I've done this. (Ian, could you merge) Fri Nov 12

Re: [Haskell-cafe] Re: Updating Haskell Packages through Archlinux becoming A Pain

2010-11-15 Thread Magnus Therning
On Sun, Nov 14, 2010 at 00:32, Mathew de Detrich dete...@gmail.com wrote: This is an example of what happens Proceed with installation? [Y/n] Y checking package integrity... (1/1) checking for file conflicts  [##] 100% ghc-pkg: unregistering gio-0.11.1 would