Does marking the call `unsafe` make any difference?
This is running on a *NIX of some flavour?
--
Jason Dusek
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 2009-11-09 14:22 -0800 (Mon), muad wrote:
> > Proof: True for n = 0, 1, 2, 3, 4 (check!), hence true for all n. QED.
> > ...
Actually, the test is that it's true for 0 through 4 is not sufficient
for a proof; you also need to prove in some way that you need do no
further tests. Showing that pa
Recently, I received as gift medical instruments designed by one of my father
former students. There is a description of these instruments on my web page.
Here is the address:
http://www.discenda.org/med/
By the way, I am not that guy that appears in a picture wearing emg sensors.
That said, t
On Nov 9, 2009, at 11:27 PM, Gracjan Polak wrote:
With special apologies to Luke Palmer that it took the Haskell
community 7.5 years to catch up with Perl.
We may not have had the simple name "don't",
but we've been able to write "const $ return ()" for a long time.
_
Principal investment firm based in Manhattan is looking for an outstanding
software developer to maintain and develop proprietary accounting and
portfolio management systems.
You should have at least a bachelor’s degree in computer science from a top
university and impeccable coding style. This
Hi all,
This email is literate Haskell. I'm struggling to come up with the
right way to add a fixpoint constructor to an expression language
described by a type-indexed GADT (details below). Any suggestions,
comments, or pointers welcome.
> {-# LANGUAGE KindSignatures, GADTs #-}
Consider the f
I haven't looked at the code extensively, I just wanted to comment on
this point:
> There is no way to remove an observer, which is something I'd expect to have
> available. I realise this would require assigning a key to each observer
> (and thus perhaps storing them in an associative map) or so
On Mon, 2009-11-09 at 17:40 +, Stephen Tetley wrote:
> 2009/11/9 Duncan Coutts :
>
> >
> > That should work, and probably the recommendation should be for cygwin
> > users to edit their cabal config to at add C:\cygwin\lib and C:\cygwin
> > \usr\include as standard.
>
>
> Hi Duncan
>
> That
I have come across an example:
> However, the following proof of the lovely identity:
> sum . map (^3) $ [1..n] = (sum $ [1..n])^2 is perfectly rigorous.
>
> Proof: True for n = 0, 1, 2, 3, 4 (check!), hence true for all n. QED.
>
> In order to turn this into a full-fledged proof, all you have
It's not your class definition that is the problem -- your class
definition is good.
The problem is that when you interact with it using the REPL, you
don't specify any particular type you want so it's ambiguous. Usually
this is not a problem in actual programs that you compile because
th
Thanks, that works. But how sould I change my class definition, so that it
works without (2::Int), but just with 2?
Ross Mellgren wrote:
>
> You did not specify what type of number it is -- in Haskell numeric
> constants like "1" are actually typed as forall a. Num a -- that is,
> can be an
Hi all,
while coding recently I came across the need for
a strict mapM (that I indicidently use for m = MaybeT IO).
I implementented this with the following simple code
(it works for my use case):
mapM' :: Monad m => (a-> m b) -> [a] -> m [b]
mapM' _ [] = return []
mapM' f (x:xs) = do y <-
On Sun, 2009-11-08 at 19:29 -0800, Philippos Apolinarius wrote:
> D:\ghc\ghcapi>cabal install mkcabal
Note that as of cabal-install-0.8, the "mkcabal" functionality is
integrated as "cabal init" (thanks to Brent Yorgey). This does not
depend on less portable packages like pcre and readline (meani
Oh, crap, I'm sorry, I completely misread your post...
Disregard my previous message.
/Joe
On Nov 9, 2009, at 1:44 PM, Paul Tokarev wrote:
Hi.
I am using Hugs 98
I have that piece of code:
class PlusTimes a where
plus :: a -> a -> a
instance PlusTimes Int where
plus x y = x + y
when
(+) is a name that is already taken by the Num typeclass, you're
trying to overload it with a different class. It's equivalent to doing:
foo :: Int
foo = 1
foo :: String
foo = "abc"
this would cause an (obvious) namespace collision. If you want to
redefine (+), you'll have to import a qual
You did not specify what type of number it is -- in Haskell numeric
constants like "1" are actually typed as forall a. Num a -- that is,
can be any type of Num.
Try: plus (2::Int) 3
-Ross
On Nov 9, 2009, at 1:44 PM, Paul Tokarev wrote:
Hi.
I am using Hugs 98
I have that piece of code:
Hi.
I am using Hugs 98
I have that piece of code:
class PlusTimes a where
plus :: a -> a -> a
instance PlusTimes Int where
plus x y = x + y
when I run : "plus 2 3" I get this error:
ERROR - Unresolved overloading
*** Type : (Num a, PlusTimes a) => a
*** Expression : plus 2 3
What
On 9 Nov 2009, at 17:41, Neil Brown wrote:
Just to clarify -- I meant access to another MVar. Basically, if I
do this:
do v <- newMVar
addObserver sub (putMVar v)
If when the observers are run, the MVar v (that I've allocated) is
non-empty, my code will block until it is empty, which w
That sounds vaguely ominous... "Sir, we've achieved reactive in
O'Haskell, we'll have ten minutes till the VB GUI detects his IP
address!"
...
But in all seriousness, it is my understanding that O'Haskell has
fallen into disuse. IIRC Timber is the spiritual successor, but I have
no idea h
Andy Gimblett wrote:
was a bit surprised at first that the observers were called
synchronously. Asynchronous is what I'd expect, and it's also
harder to code the asynchronous handlers wrongly. One blocking call
(such as putMVar) in a synchronous handler can screw up your whole
program by del
On Mon, Nov 9, 2009 at 10:09 AM, Emil Axelsson wrote:
> Nice!
>
> One of our project members has been looking at Atom, not for numerical
> computations, but for real-time scheduling (which Feldspar should deal with
> eventually).
>
> What kind of code (in terms of efficiency) does the above descri
2009/11/9 Duncan Coutts :
>
> That should work, and probably the recommendation should be for cygwin
> users to edit their cabal config to at add C:\cygwin\lib and C:\cygwin
> \usr\include as standard.
Hi Duncan
That would definitely be the best idea, but where does the cabal config live?
I ha
On 9 Nov 2009, at 16:47, Eduard Sergeev wrote:
Andy Gimblett-2 wrote:
Possibly. Care to expand? If you have a more elegant solution,
which
fits in well with ordinary wxHaskell, I'd be interested.
I believe there are a few experimental frameworks built on top of
wxHaskell
which use Fun
On Mon, 2009-11-09 at 13:08 +, Stephen Tetley wrote:
> At this point I'd edit the *.cabal files in each component – this is
> not 'the done thing', but both libraries need extra flags and as I
> have to compile them rarely I tend to forget the format (which appears
> to be Windows style full p
Andy Gimblett-2 wrote:
> Possibly. Care to expand? If you have a more elegant solution, which
> fits in well with ordinary wxHaskell, I'd be interested.
I believe there are a few experimental frameworks built on top of wxHaskell
which use Functional Reactive Programming, like
http://www.has
On Mon, 2009-11-09 at 16:02 +, Michael Fan wrote:
> I figured it out. It appears to be "Colour" package specific.
> The datadir still point to "c:\Program File" even with --user.
> I manually edit the dist/setup-config and get Colour installed.
> After that, other packages seem working fine.
>
I figured it out. It appears to be "Colour" package specific.
The datadir still point to "c:\Program File" even with --user.
I manually edit the dist/setup-config and get Colour installed.
After that, other packages seem working fine.
Jian Fan wrote:
> Does cabal install --user or --prefix work o
On 9 Nov 2009, at 15:21, Eduard Sergeev wrote:
Andy Gimblett-2 wrote:
To help manage dependencies between state and UI elements, I looked
for a
Haskell version of the Observer design pattern
Isn't Reactive Programming approach more suitable than Observer if
we talk
about Haskell?
Poss
Hi Neil,
On 9 Nov 2009, at 14:50, Neil Brown wrote:
1. Does anyone have any comments, on either version?
There is no way to remove an observer, which is something I'd expect
to have available. I realise this would require assigning a key to
each observer (and thus perhaps storing them in a
Andy Gimblett-2 wrote:
> To help manage dependencies between state and UI elements, I looked for a
> Haskell version of the Observer design pattern
Isn't Reactive Programming approach more suitable than Observer if we talk
about Haskell?
--
View this message in context:
http://old.nabble.com/
Andy Gimblett wrote:
Hi all,
I've been doing some GUI programming recently, using wx. To help
manage dependencies between state and UI elements, I looked for a
Haskell version of the Observer design pattern, and I found an
implementation written by Bastiaan Heeren of ou.nl [1].
Now, before
Hi all,
I've been doing some GUI programming recently, using wx. To help
manage dependencies between state and UI elements, I looked for a
Haskell version of the Observer design pattern, and I found an
implementation written by Bastiaan Heeren of ou.nl [1].
It pretty much did what I want
Hello friends,
I want a package which can't be built with the version of gcc coming
with the current release of ghc, so I installed a sufficient version of
gcc and called cabal with the parameters that should override it's
default settings (see the failure.log, line 112).
But I have the impressio
On Sun, 2009-11-08 at 19:29 -0800, Philippos Apolinarius wrote:
> I made small improvements in the Small Japi Binding, and asked how to
> make it available. I received a few private messages advising me to
> build and package the library using a tool called cabal. Since I have
> used installation t
Hello Gregory and Philippos
Gregory, methinks you are a unix user as "Cabal" gives you a carefree
existence (the scare quotes do highlight that it's not poor Cabal's
fault).
Philippos, the problems you are having aren't which cabal per-se but
Haskell libraries that bind C libraries. On Windows I
On Sun, 2009-11-08 at 20:47 -0800, Gregory Crosswhite wrote:
> Actually, let me clarify my point: I have rarely encountered problems
> when using Cabal as a package distribution system, but I have run into
> problems when using it as a build system in a non-trivial manner. For
> example, when I w
Hi,
Somebody has idea, how to achieve reactive in O'Haskell?
Shawn Wang
_
MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
http://kaba.msn.com.cn/?k=1_
On Mon, Nov 9, 2009 at 4:01 AM, Gracjan Polak wrote:
> Of course commercial options are available on case by case basis.
When Acme.Dont licensing has made you a billionaire, remember the little people.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.
Deniz Dogan gmail.com> writes:
>
> Are you sure you want to license this as BSD?
>
Yes, BSD3 to be more exact.
Of course commercial options are available on case by case basis.
--
Gracjan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
h
2009/11/9 Gracjan Polak :
> Hello fellow haskellers,
>
> While reading reddit in the morning today:
>
> http://www.reddit.com/r/programming/comments/a26fe/dont/
>
> I was shocked and surprised to see that Haskell lacks a very important
> feature present in Perl. It appeared that Haskell cannot not
Hello fellow haskellers,
While reading reddit in the morning today:
http://www.reddit.com/r/programming/comments/a26fe/dont/
I was shocked and surprised to see that Haskell lacks a very important
feature present in Perl. It appeared that Haskell cannot not do
monadic actions!
I decided to act a
there is also a binding for libGD on hackage :
http://hackage.haskell.org/package/gd
And, of course, you can improve it, or write a binding to a more
complete library. Or, even better, write a mix between
http://www.libpng.org/pub/png/pngdocs.html
and
http://hackage.haskell.org/package/binary
Tom Hawkins skrev:
On Fri, Nov 6, 2009 at 6:28 AM, Emil Axelsson wrote:
I'm trying to get realtime signal processing with Haskell for long. I make
progress, but slowly. Has Ericsson ever thought about using Haskell itself
for signal processing? (But I think they already have Erlang?)
No, usin
WinGHCi options are stored under
HKEY_CURRENT_USER\Software\Haskell\WinGhci in the Windows registry.
Cheers,
Pepe
2009/11/7 Henk-Jan van Tuyl
>
> L.S.,
>
> I changed the options in WinGHCi and now WinGHCi is stuck in a loop each
> time I start it; how can I edit the options? I cannot find them
Excerpts from Michael Snoyman's message of Sat Nov 07 22:55:14 +0100 2009:
> On Sat, Nov 7, 2009 at 9:54 PM, Henning Thielemann <
> lemm...@henning-thielemann.de> wrote:
>
> >
> > On Sat, 7 Nov 2009, Jose Iborra wrote:
> >
> > Sorry for the confusion, I never meant that c-m-e can show stack trace
On Sun, Nov 8, 2009 at 10:30 PM, michael rice wrote:
>
> This doesn't.
>
> area :: [(Double,Double)] -> Double
> area p = abs $ (/2) $ area' (last p):p
>
> where area' [] = 0
>area' ((x0,y0),(x,y):ps) = ((x0-x)*(y0+y)) + area'
> (x,y):ps
>
>
This function is almost correct
Ketil Malde writes:
> data Tree a = Empty | Branch a [Tree a]
> What would the consequences be if you replaced your definition with
> this one?
And, for extra credit, can you identify similar issues with this
definition? Can you improve on it?
-k
--
If I haven't seen further, it is by s
47 matches
Mail list logo