Re: [Haskell-cafe] ANNOUNCE: graphtype — A simple tool to illustrate dependencies between Haskell types

2009-08-24 Thread Bernie Pope
2009/8/24 Max Desyatov : > graphtype was developed to visualise type declarations in you Haskell > source files.  It produces .dot-file for subsequent processing with > graphviz. > Anyway, graphtype is fairly usable.  Leave here your questions, > suggestions and have fun looking at type dependenc

Re: [Haskell-cafe] ANNOUNCE: jhc 0.7.1

2009-08-24 Thread Paulo Tanimoto
Hi John, On Mon, Aug 24, 2009 at 11:13 PM, John Meacham wrote: > Hi, I am happy to announce the jhc optimizing haskell compiler version 0.7.1. > > Information on installing jhc is here: > http://repetae.net/computer/jhc/building.shtml > And the Main page is here:  http://repetae.net/computer/jhc

[Haskell-cafe] ANNOUNCE: jhc 0.7.1

2009-08-24 Thread John Meacham
Hi, I am happy to announce the jhc optimizing haskell compiler version 0.7.1. Information on installing jhc is here: http://repetae.net/computer/jhc/building.shtml And the Main page is here: http://repetae.net/computer/jhc There have been a lot of changes since the last public release, Some not

Re[2]: [Haskell-cafe] Unifcation and matching in Abelian groups

2009-08-24 Thread Bulat Ziganshin
Hello John, Tuesday, August 25, 2009, 4:51:16 AM, you wrote: > In those day, procedures tended to large and deeply nested because > procedure invocation was expensive. interesting story. in 80s, virtual method call was expensive. now lazy evaluation is expensive. what's next? :) -- Best regard

Re: [Haskell-cafe] Unifcation and matching in Abelian groups

2009-08-24 Thread John D. Ramsdell
> ... Haskell is old and has the optional offset rule: > > do { prob <- getLine >     ; test prob >     ; main} It's interesting to see people put semicolons at the begining of a line of code. In 1970s, people used to draw lines on printouts of Ada and Pascal code to connect the begins with the e

[Haskell-cafe] Re: rotate image

2009-08-24 Thread H. M.
Hello, I want to paint in some widget, but this will be in front of some background, so the bg should be transparent. At the moment it looks something like this (where it isn't the case): -- drawA <- drawingAreaNew widgetSetSizeRequest drawA 30 30 fixedPut fBox drawA (400,400) imgAt <- im

Re: [Haskell-cafe] Re: rotate image

2009-08-24 Thread Jeff Heard
ahh, you want to paint against the desktop, then, yes? That requires compositing, and I'm not sure there's a way to do that with Gtk directly. Probably easier with X and OpenGL. Needs more of a Gnome expert than me. On Mon, Aug 24, 2009 at 6:34 PM, h wrote: > Hello, > >> You could use Cairo.  L

Re: [Haskell-cafe] How to convert a list to a vector encoding its length in its type?

2009-08-24 Thread Bas van Dijk
On Tue, Aug 25, 2009 at 12:07 AM, Ryan Ingram wrote: > unsafeCoerce is ugly and I wouldn't count on that working properly. > > Here's a real solution: > ... Thanks very much! I'm beginning to understand the code. The only thing I don't understand is why you need: > newtype Witness x = Witness {

Re: [Haskell-cafe] oauth in haskell - reviewers?

2009-08-24 Thread Diego Souza
Hi Don, no, not really, I completely missed that point. But if that is the case, I presume there is no difference in using other licenses, like BSD3. Is that the case? Thanks, On Mon, Aug 24, 2009 at 02:24:09PM -0700, Don Stewart wrote: > I notice hoauth is packaged as LGPL. Since we use static

[Haskell-cafe] Re: rotate image

2009-08-24 Thread h
Hello, > You could use Cairo. Load the image to a surface, then rotate the surface 10 degrees and paint it. The first steps aren’t problematic, but how can I paint it - in which widget - so that the background is transparent, with drawingArea it doesn't seem to work. -- best regards H.

[Haskell-cafe] Re: Linking problem with GHCi

2009-08-24 Thread Maurí­cio CA
With a specific package (bindings-common, with the latest version in hackage) if I ask GHCi to read it I get: ghc-6.8.2: /home/mauricio/lib/bindings-common-0.2.5/ghc-6.8.2/HSbindings-common-0.2.5.o: unknown symbol `atexit' If I build a library or executable cabal package depending on it, I ha

Re: [Haskell-cafe] How to convert a list to a vector encoding its length in its type?

2009-08-24 Thread Ryan Ingram
unsafeCoerce is ugly and I wouldn't count on that working properly. Here's a real solution: > {-# LANGUAGE GADTs, RankNTypes, TypeFamilies, ScopedTypeVariables, > FlexibleContexts #-} > {-# LANGUAGE FlexibleInstances #-} > module LevMar where > import Data.Maybe (fromJust) Type-level number sc

Re: [Haskell-cafe] Is logBase right?

2009-08-24 Thread Dan Weston
I don't know if anyone actually answered the question you didn't ask, but you can always improve an inaccurate guess when you need to. A limit will always exist, and should be unique (independent of the initial guess), assuming (+) and (*) are well-conditioned. In practice, a single first-orde

Re: [Haskell-cafe] oauth in haskell - reviewers?

2009-08-24 Thread Don Stewart
I notice hoauth is packaged as LGPL. Since we use static linking in GHC, this makes it in practice GPL. Is that the intent? -- Don wei.hoo: > I recommend "Learn you a Haskell for great good": > http://learnyouahaskell.com/functors-applicative-functors-and-monoids#applicative-functors > > On Sun,

Re: [Haskell-cafe] rotate image

2009-08-24 Thread h.
Hello, > You could use Cairo. Load the image to a surface, then rotate the surface > 10 degrees and paint it. The first steps aren’t problematic, but how can I paint it - in which widget - so that the background is transparent, with drawingArea it doesn’t seem to work. -- best regards H. -- V

Re: [Haskell-cafe] oauth in haskell - reviewers?

2009-08-24 Thread Wei Hu
I recommend "Learn you a Haskell for great good": http://learnyouahaskell.com/functors-applicative-functors-and-monoids#applicative-functors On Sun, Aug 23, 2009 at 12:25 PM, Diego Souza wrote: > A quick search pointed me to this: > http://www.soi.city.ac.uk/~ross/papers/Applicative.html > > Is th

Re: [Haskell-cafe] rotate image

2009-08-24 Thread Jeff Heard
You could use Cairo. Load the image to a surface, then rotate the surface 10 degrees and paint it. Alternately, in Hieroglyph: renderToPNG w h "image.png" $ rotate 10 image{ filename='whatever.png' } On Mon, Aug 24, 2009 at 3:57 PM, h wrote: > Hello, > > I already studied the references of gtk2

[Haskell-cafe] rotate image

2009-08-24 Thread h
Hello, I already studied the references of gtk2hs for hours, as well as searched in the web, but didn't found any working solution. The problem is to load an image, a png with alpha channel, rotate it e.g. 10 degree, and show it on the screen, basically as when it would be shown with imageNewF

[Haskell-cafe] ANN: rss2irc 0.3 released

2009-08-24 Thread Simon Michael
rss2irc is an irc bot created by Don Stewart to watch rss feeds and announce new items on irc. I have been tweaking and testing it for a while, and have taken up the maintainer reins. I'm happy to announce release 0.3, with: - reliable http networking - irc flood protection - better error h

[Haskell-cafe] Linking problem with GHCi

2009-08-24 Thread Maurí­cio CA
With a specific package (bindings-common, with the latest version in hackage) if I ask GHCi to read it I get: ghc-6.8.2: /home/mauricio/lib/bindings-common-0.2.5/ghc-6.8.2/HSbindings-common-0.2.5.o: unknown symbol `atexit' If I build a library or executable cabal package depending on it, I hav

[Haskell-cafe] Re: Converting typeset mathematics into Haskell ?

2009-08-24 Thread Bernd Brassel
Sometimes the synchronicity of events is eery. Incidentally I have just written a proposal for just such a project. You can have a look at it at http://www-ps.informatik.uni-kiel.de/~bbr/WebOfProofs.html Although not directly mentioned in the proposal, there will be a lot of "Converting type

[Haskell-cafe] Problem building encoding-0.6.0: missing Data.CharMap.Builder

2009-08-24 Thread João Rafael Nicola
Hi, I am trying to install the encoding-0.6.0 package, but it complains that that package "Data.CharMap.Builder" is missing. I could not find any reference to that package anywhere on the web. Does anyone know where I can find it or a workaround? Thanks, João Rafael > cabal install encoding Re

[Haskell-cafe] Gtk2Hs drag and drop

2009-08-24 Thread frantisek kocun
Hi, have somebody used drag and drop feature of Gtk2hs? I can't find any tutorial or demo. I'm using only the documentation but I think I'm missing something. Can anyone give me an example? Thanks in forward! Fero ___ Haskell-Cafe mailing list Haskell-C

[Haskell-cafe] [ann] formlets 0.6

2009-08-24 Thread Chris Eidhof
Hey everyone, I wanted to let you know that the formlets team has released a new version of the formlets [1] on hackage, a library to build type-safe, composable web forms. Most notably, Mightybyte and I worked on the massInput functionality, which is now ready for use! Mightybyte has an

Re: [Haskell-cafe] Functional Dependencies and multiparameter typeclasses

2009-08-24 Thread Bulat Ziganshin
Hello Harald, Monday, August 24, 2009, 3:17:28 PM, you wrote: > class Pixel p where > -- | an image could be a UArray or a list of lists of pixels > class Pixel p => Image a p where read http://haskell.org/haskellwiki/OOP_vs_type_classes here you say that Image is a particular

[Haskell-cafe] ANNOUNCE: graphtype — A simple tool to illustrate dependencies between Haskell types

2009-08-24 Thread Max Desyatov
While developing applications which deal with complex data it is crucial to know how exactly you manipulate this data. Haskell provides excellent tools for expressing a data scheme you work with: ADTs, `type` and `newtype` declarations, type classes and much more is hidden in rich Haskell's type

[Haskell-cafe] ANNOUNCE: OAuth library in haskell

2009-08-24 Thread Diego Souza
Dear Haskellers, hoauth is a library which helps you to deal with oauth protocol. Currently it supports only consumer side applications, but there are plans to add service providers support in near future. The source code can be found at [darcs]: http://projects.bitforest.org/hoauth/ and now in h

Re: [Haskell-cafe] Functional Dependencies and multiparametertypeclasses

2009-08-24 Thread Harald ROTTER
Thanks for the quick response. Your explanation is so much clearer than ghc's error messages :-)) Harald. |-+--> | | Miguel Mitrofanov | | | | | | | | |

Re: [Haskell-cafe] oauth in haskell - reviewers?

2009-08-24 Thread Diego Souza
Hi Alex, It indeed helped a lot. I'm still reading more about Control.Applicative, but I applied your other suggestions and they in fact reduced duplication. I'm going to upload it to hackage and let's see how it goes. Thanks, -- ~dsouza yahoo!im: paravinicius gpg key fingerprint: 71B8 CE21 3A6

Re: [Haskell-cafe] Functional Dependencies and multiparameter typeclasses

2009-08-24 Thread Miguel Mitrofanov
However, I do not really understand the cause of the original problem. Why do I need the functional dependency to make this work ? Suppose you have an instance: instance Pixel MyPixel where... instance Image MyImage MyPixel where width i = countPixels i ... And somebody (not necessarily yo

[Haskell-cafe] Functional Dependencies and multiparameter typeclasses

2009-08-24 Thread Harald ROTTER
Dear Haskellers, I am using multi parameter typeclasses to represent images consisting of pixels (e.g. bitmap images). {-# OPTIONS_GHC -XMultiParamTypeClasses #-} module Bitmap where -- | a pixel could be a Word8 (e.g. a graysclale image) -- | or a 3-tuple for RGB images class