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
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
Thanks for the quick response. Your explanation is so much clearer than
ghc's error messages :-))
Harald.
|-+--
| | Miguel Mitrofanov |
| | miguelim...@yandex|
| | .ru |
| |
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
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
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
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
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
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
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
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
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
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
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, hh._h._...@hotmail.com wrote:
Hello,
I already studied the
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 Souzadso...@bitforest.org wrote:
A quick search pointed me to this:
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.
--
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, Aug
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
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
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
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.
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
On Tue, Aug 25, 2009 at 12:07 AM, Ryan Ingramryani.s...@gmail.com 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
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, hh._h._...@hotmail.com wrote:
Hello,
You
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 -
... 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 ends.
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
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
Hi John,
On Mon, Aug 24, 2009 at 11:13 PM, John Meachamj...@repetae.net 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:
2009/8/24 Max Desyatov explicitc...@googlemail.com:
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
30 matches
Mail list logo