None of the frameworks in http://www.haskell.org/haskellwiki/Applications_and_libraries/GUI_libraries#High-level appear
to have a working build in http://hackage.haskell.org/packages/archive/pkg-list.html#cat:gui, except wxFruit. Is there a
need that isn't being met for high-level GUI libraries?
erik flister wrote:
Michael Mossey wrote:
Regarding my use of Rational, it's because I'm representing
*notated* durations or positions in time, which are always fractions
of integers. Suppose I give the command to my program to play via
midi everything from bar 1 beat 1
Felipe Lessa felipe.le...@gmail.com wrote:
On Sat, Jul 3, 2010 at 9:25 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Haskell provides a lot of low level glue like laziness, currying and
other very helpful language features. But what is different in
Haskell is that it doesn't seem to provide
About monad transformers, I don't really like to use them because they
can get hairy in some cases, and because they have poor performance in
other cases.
Then what is your alternative? How do you replace monad transformers?
___
Haskell-Cafe
On 5 July 2010 10:39, Yves Parès limestr...@gmail.com wrote:
Then what is your alternative? How do you replace monad transformers?
Possibly more a case of doing without rather than replacing them with
something else, you would amalgamate all the monadic effects you want
into one monad.
E.g.
Stephen Tetley stephen.tet...@gmail.com wrote:
On 5 July 2010 10:39, Yves Parès limestr...@gmail.com wrote:
Then what is your alternative? How do you replace monad
transformers?
Possibly more a case of doing without rather than replacing them with
something else, you would amalgamate all
On Fri, Jul 2, 2010 at 15:43, Edward Kmett wrote:
I've had a fairly easy time of hiring Haskell programmers.
Does this mean your company actively uses Haskell in projects? Would you be
willing/able to describe this work in more detail for the curious?
Sean
On Mon, Jul 5, 2010 at 6:12 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Felipe Lessa felipe.le...@gmail.com wrote:
On Sat, Jul 3, 2010 at 9:25 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Haskell provides a lot of low level glue like laziness, currying and
other very helpful language
Dear Cafe,
since a little discussion with my tutor I am wondering how the following
problem can be solved and if it is decidable:
Given the definition of a recursive function f in, say, haskell,
determine if f can be implemented in O(1) memory.
First I thought the solution would be check
Very often the type system assures safety to a point where some coding is
done trough trial and error: -I think that this composition is right, let´s
try it-... -oh, some missing type here, Let´s put it here and here-...-go
on-... -The typechecker say t´s OK. I run it and, well it works. Later
Hi Steffen,
Steffen Schuldenzucker wrote:
since a little discussion with my tutor I am wondering how the following
problem can be solved and if it is decidable:
Given the definition of a recursive function f in, say, haskell,
determine if f can be implemented in O(1) memory.
Constant
Hi,
I am porting a C++ program to Haskell. My current task is to take a class
hierarchy and produce something equivalent in Haskell, but I don't seem to
be able to get a grip on how type classes and instances contribute to the
solution. Can anyone enlighten me?
Roughly, the class hierarchy in
On 5 July 2010 11:30, Ertugrul Soeylemez e...@ertes.de wrote:
That's what monad transformers are good for. Why reinvent the wheel?
Hi Ertugrul
The post was chiming in with Felipe Lessa's comment upthread that
avoiding transfomers can have performance benefits.
Whether the formulation I gave
My guess is that it's
class B : public A
and
class C : public A
In this case it seems perfect to use type classes:
class A t where do_x :: t - Integer - Integer - Integer
data B = ...
instance A B where do_x b x y = ...
data C = ...
instance A C where do_x c x y = ...
If you want some general
On Monday 05 July 2010 15:22:43, Simon Courtenage wrote:
Hi,
I am porting a C++ program to Haskell. My current task is to take a
class hierarchy and produce something equivalent in Haskell, but I don't
seem to be able to get a grip on how type classes and instances
contribute to the
Felipe Lessa felipe.le...@gmail.com wrote:
On Mon, Jul 5, 2010 at 6:12 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Felipe Lessa felipe.le...@gmail.com wrote:
On Sat, Jul 3, 2010 at 9:25 AM, Ertugrul Soeylemez e...@ertes.de wrote:
Haskell provides a lot of low level glue like laziness,
Does this work for you?
data A a = A (Int,Int)
data B
data C
class A_Class a where
do_x :: a - Int
instance A_Class (A B) where
do_x (A (a,b)) = a + b
instance A_Class (A C) where
do_x (A (a,b)) = a - b
-- do_x ((A (1,2)) :: A B)
-- 3
-- do_x ((A (1,2)) :: A C)
-- -1
-deech
On Mon,
Stephen Tetley stephen.tet...@gmail.com wrote:
On 5 July 2010 11:30, Ertugrul Soeylemez e...@ertes.de wrote:
That's what monad transformers are good for. Why reinvent the
wheel?
The post was chiming in with Felipe Lessa's comment upthread that
avoiding transfomers can have performance
On Sun, Jul 04, 2010 at 10:31:34AM +0100, Andrew Coppin wrote:
I have literally no idea what a type family is. I understand ATs (I think!),
but TFs make no sense to me.
ATs are just TFs which happen to be associated with a particular
class. So if you understand ATs then you understand TFs
Simon Courtenage wrote:
I am porting a C++ program to Haskell. My current task is to take a
class hierarchy and produce something equivalent in Haskell, but I don't
seem to be able to get a grip on how type classes and instances
contribute to the solution.
They probably do not contribute
This really helped, but now I am trying to add a new track to the database
using a menu but it won't compile. I have tried a lot of different things
but to no avail.
When I get rid of the menu I am able to run, for example, newRecord This
Charming Man The Smiths 1 []
This adds the data to an
Does this code compile? The line type Sales = Sales Record for
instance is wrong - it should be data Sales = Sales Record.
Additionally recordSale returns an Int, not [Sales].
-deech
On Mon, Jul 5, 2010 at 10:50 AM, Mrwibbly jackwater...@googlemail.com wrote:
This really helped, but now I am
You said it didn't compile. I somehow missed that , sorry.
-deech
On Mon, Jul 5, 2010 at 11:06 AM, aditya siram aditya.si...@gmail.com wrote:
Does this code compile? The line type Sales = Sales Record for
instance is wrong - it should be data Sales = Sales Record.
Additionally recordSale
I changed that line to say type Sales = Sales Record. But unfortunately it
still fails to compile. Do you have any idea why this might be the case?
-Jack
aditya siram-2 wrote:
You said it didn't compile. I somehow missed that , sorry.
-deech
On Mon, Jul 5, 2010 at 11:06 AM, aditya siram
Yes there are a few more problems. Instead of point out each one here
is some modified code that does compile. Compare it to what you have
and let me know if you have questions:
type Title = String
type Artist = String
type Sold = Int
type Record = (Title, (Artist, Sold))
testDatabase ::
And here's a more sane version of recordSale:
recordSale' :: Title - [Record] - [Record]
recordSale' title sales =
case (Prelude.lookup title sales) of
Nothing - error This record does not exist
Just x - [addSale (title,x)] ++ (filter (\a - (getTitle a) /=
title) sales)
-deech
On Mon,
On Jul 5, 2010, at 7:50 AM, Mrwibbly wrote:
This adds the data to an empty database but I can't seem to call newRecord
again and add another record to the existing database.
The issue is that you need to use the new database returned by newRecord in
subsequent executions of your main loop.
Tillmann Rendel wrote:
Hi Steffen,
Steffen Schuldenzucker wrote:
Given the definition of a recursive function f in, say, haskell,
determine if f can be implemented in O(1) memory.
Constant functions are implementable in O(1) memory, but interpreters
for turing-complete languages are not, so
On Mon, Jul 5, 2010 at 10:29 AM, Ertugrul Soeylemez e...@ertes.de wrote:
It happened once to me that I forgot that MVars don't have a queue. A
database thread would take values out of the MVar as commands and
execute them, but I used the same thread to put a command into the MVar
(for later
Brent Yorgey wrote:
On Sun, Jul 04, 2010 at 10:31:34AM +0100, Andrew Coppin wrote:
I have literally no idea what a type family is. I understand ATs (I think!),
but TFs make no sense to me.
ATs are just TFs which happen to be associated with a particular
class. So if you understand
On Mon, Jul 5, 2010 at 1:39 AM, John Smith volderm...@hotmail.com wrote:
None of the frameworks in
http://www.haskell.org/haskellwiki/Applications_and_libraries/GUI_libraries#High-levelappear
to have a working build in
http://hackage.haskell.org/packages/archive/pkg-list.html#cat:gui, except
data A_GADT where A_GADT :: A t = t - A_GADT
By the way, is there an extension that enables A_GADT to be automatically
declared as an instance of class A?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello,
I don't know if some of you are familiar with the SFML library (stands for
Simple and Fast Multimedia Library) -- http://sfml-dev.org
As SDL, SFML is a 2D graphics library, but conversely to SDL it provides a
hardware-accelerated drawing, through OpenGL.
Well, I'm currently writing its
Hey everyone,
What is the current state regarding transformers versus monadLib versus
mmtl versus ... etc.? Transformers seems to be the blessed
replacement for mtl, so when is it worthwhile to use the other libraries
instead?
It hadn't even occurred to me to look closely at packages other than
On 07/05/2010 04:48 PM, Yves Parès wrote:
3) Is there another library on hackage that handles images in a
functional way? (I mean not /all in IO/)
Check out graphics-drawingcombinators.
- Jake
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hey everyone,
What is the current state of opinion regarding transformers versus monadLib
versus
mmtl versus ... etc.? Transformers seems to be the blessed
replacement for mtl, so when is it worthwhile to use the other libraries
instead?
(It hadn't even occurred to me to look closely at
Inspired by a comment by Simon Marlow on Stack Overflow, about the time
and space tradeoffs we make with garbage collection, particularly with a
generational GCs, I wrote a small program, ghc-gc-tune, to traverse the
garbage collector variable space, to see the relationship between
settings and
On Mon, Jul 5, 2010 at 2:41 PM, Ertugrul Soeylemez e...@ertes.de wrote:
Yes, there is some performance loss because of wrapping/unwrapping, but
I think this loss is neglible for most applications. And I'd ask
anyway. This is a discussion thread after all. =)
Pretty much all monad
Gregory Crosswhite gcr...@phys.washington.edu wrote:
What is the current state of opinion regarding transformers versus
monadLib versus mmtl versus ... etc.? Transformers seems to be the
blessed replacement for mtl, so when is it worthwhile to use the
other libraries instead?
(It hadn't
(I asked this question on the logical email list to ask, haskell-mode, but
got no reply, so I'm hoping someone here might know the answer.)
I tried to use tags with emacs.
I ran :etags in ghci, then tried to use C-c M-. inside Emacs
to find the definition of a symbol. It reported no source
Graphviz (http://graphviz.org/) has the option to convert provided Dot
code for visualising a graph into a canonical form. For example, take
the sample Dot code:
| digraph foo {
| a [color=blue];
| subgraph cluster_bar {
| a [label=hi!]
| b [color=blue, label=bye!];
Ivan Lazar Miljenovic wrote:
Stephen Tetley stephen.tet...@gmail.com writes:
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I switched to GHC.
People still use Hugs? :p
MPJ uses it for teaching Haskell because it's a lot easier to
Ivan Lazar Miljenovic wrote:
Stephen Tetley stephen.tet...@gmail.com writes:
On 3 July 2010 14:00, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote:
So this argument isn't valid ;-)
I think it was Hugs compliant as least for some revisions - I seem to
remember looking at it before I
Andrew Coppin wrote:
Brent Yorgey wrote:
On Sun, Jul 04, 2010 at 10:31:34AM +0100, Andrew Coppin wrote:
I have literally no idea what a type family is. I understand ATs (I
think!), but TFs make no sense to me.
ATs are just TFs which happen to be associated with a particular
class. So
44 matches
Mail list logo