Petr Pudlak wrote:
Would it be possible to create a lazy selection/sorting
algorithm so that getting any element of the sorted list/array by its index
would require just O(n) time, and getting all the elements would still be in
O(n * log n)?
The (merge) sorting algorithm provided by Data.List
Stephan Friedrichs wrote:
Johan Tibell wrote:
[...]
I also think void is clearer than ignore.
So do I. Another point is, that it's familiar from other languages; a
function void f(...) doesn't return anything but may have an effect on the
environment.
That depends on what languages you are
Hello Magnus,
Sunday, July 12, 2009, 12:12:01 PM, you wrote:
That depends on what languages you are familiar with, of course. To me void
is a type (C/C++) while ignore is a function (OCaml) ;-)
you can write (void) :)
--
Best regards,
Bulat
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Of course, some part of algorithm has to be recursive, but this can be
outsourced to a general recursion scheme, like the hylomorphism
hylo :: Functor f = (a - f a) - (f b - b) - (a - b)
hylo f g = g . fmap (hylo f g) . f
Jeremy Yallop wrote:
Why does compiling the following program give an error?
{-# LANGUAGE TypeFamilies, RankNTypes #-}
type family TF a
identity :: (forall a. TF a) - (forall a. TF a)
identity x = x
GHC 6.10.3 gives me:
Couldn't match expected type `TF a1' against inferred type `TF
2009/7/9 Günther Schmidt gue.schm...@web.de
Hi,
I've developed this commercial app in Haskell with all of the business
logic coded in SQL with the help of haskelldb. Some of the intermediate
results (of queries) I had to manifest in extra tables because the initial
query was expensive, the
On Fri, 10 Jul 2009 15:24:51 +0200, Maurício briqueabra...@yahoo.com
wrote:
Is it possible to insert C code directly to, say,
.hsc files? I see this construct in ghc user docs:
I think you can find your answer here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html
--
I know that this is a bit off topic, but thought it would interest
several readers. Apparently, GS, which. AFAIK, doesn't make a lot of
noise in the FP space compared to some other banks, does use some FP:
http://www.zerohedge.com/article/aleynikov-code-dump-uncovered
Raynor Vliegendhart wrote:
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Of course, some part of algorithm has to be recursive, but this can be
outsourced to a general recursion scheme, like the hylomorphism
hylo :: Functor f = (a - f a) - (f b - b) - (a - b)
hylo f g =
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090712
Issue 125 - July 12, 2009
---
Welcome to issue 125 of HWN, a newsletter covering
On 7/12/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Raynor Vliegendhart wrote:
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Of course, some part of algorithm has to be recursive, but this can be
outsourced to a general recursion scheme, like the hylomorphism
Is it possible to insert C code directly to, say,
.hsc files? I see this construct in ghc user docs:
I think you can find your answer here:
http://www.haskell.org/ghc/docs/latest/html/users_guide/hsc2hs.html
I did read that. It says I can use #def to insert
a C definition, but there are no
On Sun, Jul 12, 2009 at 07:01:11PM +0200, Raynor Vliegendhart wrote:
On 7/12/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Raynor Vliegendhart wrote:
On 7/9/09, Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Of course, some part of algorithm has to be recursive, but this can
Probably not, but... There are stable and portable libraries
that implement functionality missing in Haskell. It could be
nice to be able to list then in a cabal file (using, say,
pkgconfig-depends) and know for sure that any system with
Haskell Platform will have then available for use with FFI.
Hello Maurício,
Sunday, July 12, 2009, 9:11:53 PM, you wrote:
I did read that. It says I can use #def to insert
a C definition, but there are no examples of use, and I
could not find one.
#def inline int signof(int x) {return x0?-1:x0?1:0;}
foreign import ccall safe
signof :: CInt - CInt
Hello Maurício,
Sunday, July 12, 2009, 9:40:06 PM, you wrote:
An example would be sqlite3.
w/o haskell binding it's useless for most of HP users
--
Best regards,
Bulatmailto:bulat.zigans...@gmail.com
___
Haskell-Cafe
On Jul 12, 2009, at 13:40 , Maurí cio wrote:
Probably not, but... There are stable and portable libraries
that implement functionality missing in Haskell. It could be
nice to be able to list then in a cabal file (using, say,
pkgconfig-depends) and know for sure that any system with
Haskell
Probably not, but... There are stable and portable libraries
that implement functionality missing in Haskell. It could be
nice to be able to list then in a cabal file (using, say,
pkgconfig-depends) and know for sure that any system with
Haskell Platform will have then available for use with
On Jul 12, 2009, at 19:38 , Maurí cio wrote:
That, of course, would be the goal. Today, it's disappointing to
write bindings, since Hackage won't build them properly (since
the libraries are not installed on hackage. Of course, for
simple packages like zlib or sqlite3 you have the alternative of
On Jul 12, 2009, at 20:06 , Brandon S. Allbery KF8NH wrote:
This isn't clear to me; in general you only need to bind them once
and then they're available in Haskell. Why not include the library
with its bindings?
The exception here is the still-evolving bindings to e.g. BLAS. It's
not
=
Final Call for Participation
The 14th ACM SIGPLAN International Conference
on Functional Programming (ICFP 2009)
http://www.cs.nott.ac.uk/~gmh/icfp09.html
This isn't clear to me; in general you only need to bind them
once and then they're available in Haskell. Why not include the
library with its bindings?
There are many ways to bind to a library. The first one isn't
usually the best.
Including the library with its bindings means you have to
22 matches
Mail list logo