What is it for? Yes, you would know that only A and B are Public, but
you have no way of telling that to the compiler.
I usually prefer something like that:
class Public x where
blah :: ...
isAB :: forall y. (A - y) - (B - y) - x - y
Both solutions, however, allow the user to declare some
Oops... Sorry, wrong line. Should be
isAB :: forall p. p A - p B - p x
On 18 Jul 2009, at 10:51, Miguel Mitrofanov wrote:
What is it for? Yes, you would know that only A and B are Public,
but you have no way of telling that to the compiler.
I usually prefer something like that:
class
Hi all,
I was looking at finger trees and the tricks for getting priority
queues out of them seemed a little hackish, with a distinguished
infinity element or maxBound. But it seems (although I have not yet
tried it) like in many cases the monoid's identity element wouldn't be
necessary (a bit
Hi Miguel
On 18 Jul 2009, at 07:58, Miguel Mitrofanov wrote:
Oops... Sorry, wrong line. Should be
isAB :: forall p. p A - p B - p x
Yep, dependent case analysis, the stuff of my thesis,...
On 18 Jul 2009, at 10:51, Miguel Mitrofanov wrote:
What is it for?
I have a different purpose in
Conor,
I'm scared. What about this?
data EQ :: * - * - * where
Refl :: EQ x x
class Public x where
blah :: EQ x Fred
instance Public Fred where
blah = Refl
What happens when I say
newtype Jim = Hide Fred deriving Public
? I tried it. I get
blah :: EQ Jim Fred
It's clear that
On 18 Jul 2009, at 01:43, Lennart Augustsson wrote:
As far as I know it works. It's an old Oleg trick.
Then it probably does work.
The only drawback is that error messages may refer to Private.
As I found out when probing its security. No instance for Moo.Private
shows up. I guess that's
Henning Thielemann lemm...@henning-thielemann.de writes:
On Thu, 16 Jul 2009, Fernan Bolando wrote:
Hi all
I recently used 2 hours of work looking for a bug that was causing
Program error: Prelude.!!: index too large
A good way to avoid such problems is to avoid partial
functions at
Henning Thielemann wrote:
Felipe Lessa schrieb:
On Fri, Jul 17, 2009 at 06:31:20PM +0200, Cetin Sert wrote:
How can I open and read colors of specific pixels of an image file in
Haskell? Which packages, functions do you recommend?
You could try DevIL, SDL-image or Gtk, I guess.
Hello,
vigalc...@ubuntu:~/FTP/Haskell/06052009.Swish-0.2.1$ cabal --version
cabal-install version 0.5.1
using version 1.4.0.1 of the Cabal library
vigalc...@ubuntu:~/FTP/Haskell/Swish-0.2.1$ cabal configure --user
--prefix=$HOME
Warning: swish.cabal: A package using section syntax should require
Am Samstag, 18. Juli 2009 06:31 schrieben Sie:
On Jul 18, 2009, at 2:35 AM, Wolfgang Jeltsch wrote:
So I should upload a package with German identifiers to Hackage?
Sure, why not? The fact that I can't read it is my loss, not your fault,
and there will be plenty of other German-reading
I couldn't find any information on whether catchSTM catches
asynchronous exceptions
so I tried to run the following:
import Control.Concurrent.STM
import Control.Concurrent
import Control.Exception
import Prelude hiding (catch)
test = do
tid - myThreadId
forkIO (threadDelay 500
Hi Stefan
On 18 Jul 2009, at 09:42, Stefan Holdermans wrote:
Conor,
What happens when I say
newtype Jim = Hide Fred deriving Public
? I tried it. I get
blah :: EQ Jim Fred
It's clear that GeneralizedNewtypeDeriving goes too far.
Now, I am scared. This should be regarded as a bug in
However you can use the wider idea of hashing: A nesting of two finite
maps. One fast, but approximative map. And one slow, but exact map.
The quintessential example is an array indexed with some hash function
for the first map. And linked lists of (key,value) pairs as the
latter.
In Haskell
On Sat, Jul 18, 2009 at 03:57:12AM -0400, Daniel Peebles wrote:
I was looking at finger trees and the tricks for getting priority
queues out of them seemed a little hackish, with a distinguished
infinity element or maxBound. But it seems (although I have not yet
tried it) like in many cases
Hello Thomas,
Saturday, July 18, 2009, 2:24:21 AM, you wrote:
Further, is there a hashtable implementation for haskell that doesn't
live in IO? Maybe in ST or something?
import Prelude hiding (lookup)
import qualified Data.HashTable
import Data.Array
import qualified Data.List as List
data
On 18 Jul 2009, at 13:26, Wolfgang Jeltsch wrote:
Am Samstag, 18. Juli 2009 06:31 schrieben Sie:
On Jul 18, 2009, at 2:35 AM, Wolfgang Jeltsch wrote:
So I should upload a package with German identifiers to Hackage?
Sure, why not? The fact that I can't read it is my loss, not your
fault,
The message means that the .cabal file should contain the line Cabal-
Version: = 1.2
Sjoerd
On Jul 18, 2009, at 11:17 AM, Vasili I. Galchin wrote:
Hello,
vigalc...@ubuntu:~/FTP/Haskell/06052009.Swish-0.2.1$ cabal --version
cabal-install version 0.5.1
using version 1.4.0.1 of the Cabal
Conor,
What happens when I say
newtype Jim = Hide Fred deriving Public
? I tried it. I get
blah :: EQ Jim Fred
Thinking of it; this *does* make sense in System FC. The newtype-
declaration gives you as an axiom
Hide :: Jim ~ Fred
To give an instance of Public for Jim, we have to
Am Samstag, 18. Juli 2009 11:43 schrieb Conor McBride:
The trouble here is that somewhere along the line (GADTs? earlier?)
it became possible to construct candidates for p :: * - * which don't
respect isomorphism.
Hello Conor,
I’m not sure whether I exactly understand what you mean here. I
On Fri, Jul 17, 2009 at 4:38 PM, Conor
McBrideco...@strictlypositive.org wrote:
class Private x where
public :: (forall x. Public x = x - y) - y
public f = f Pike
data Pike = Pike
instance Private Pike
instance Public Pike
--
But if I don't tell 'em
Am Samstag, 18. Juli 2009 08:58 schrieb Miguel Mitrofanov:
Oops... Sorry, wrong line. Should be
isAB :: forall p. p A - p B - p x
Is this a well-known approach for closing classes?
I came across the same idea and implemented a generic framework for closing
classes in this way. I did this to
On Sat, Jul 18, 2009 at 4:57 PM, Jon
Fairbairnjon.fairba...@cl.cam.ac.uk wrote:
Henning Thielemann lemm...@henning-thielemann.de writes:
On Thu, 16 Jul 2009, Fernan Bolando wrote:
Hi all
I recently used 2 hours of work looking for a bug that was causing
Program error: Prelude.!!: index
Hi Wolfgang
On 18 Jul 2009, at 13:42, Wolfgang Jeltsch wrote:
Am Samstag, 18. Juli 2009 11:43 schrieb Conor McBride:
The trouble here is that somewhere along the line (GADTs? earlier?)
it became possible to construct candidates for p :: * - * which
don't
respect isomorphism.
Hello Conor,
I am pleased to announce a new release of the graphviz package for
Haskell, which provides bindings to the GraphViz [1] suite of tools.
[1] http://www.graphviz.org/
Probably the biggest and most important change in this release is that
AFAICT, all 152 attributes utilised/supported by GraphViz
Thanks Bulat.
FWIW, i take it that
http://www.haskell.org/haskellwiki/Shootout/Knucleotide
is what Edward was referring to, with the shootouts. It seems that a
lot of progress has been made but not much has been migrated back to
hackage.
Going back to my original question, I am now looking for
---
Haskell Weekly News
http://sequence.complete.org/hwn/20090718
Issue 126 - July 18, 2009
---
Welcome to issue 126 of HWN, a newsletter covering
Hello Thomas,
Saturday, July 18, 2009, 7:23:10 PM, you wrote:
Going back to my original question, I am now looking for a dead simple
motivating example for showing the example of using a (good) hashtable
over Data.Map
spell checking?
--
Best regards,
Bulat
tphyahoo:
The code below is, I think, n log n, a few seconds on a million + element
list.
Have you tried the judy arrays library on Hackage? (It provides a
hashtable, which I've used occasionally)
-- Don
___
Haskell-Cafe mailing list
Hi,
On Sat, Jul 18, 2009 at 10:23 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
I am pleased to announce a new release of the graphviz package for
Haskell, which provides bindings to the GraphViz [1] suite of tools.
Nice work!
As the way of defining an attribute for a specific
Richard O'Keefe wrote:
On Jul 15, 2009, at 5:25 PM, Benjamin L.Russell wrote:
it interesting that you should use the biological term disease;
according to a post [1] entitled Re: Re: Smalltalk Data Structures
and Algorithms, by K. K. Subramaniam, dated Mon, 29 Jun 2009
11:25:34 +0530, on the
Richard O'Keefe wrote:
On Jul 15, 2009, at 5:25 PM, Benjamin L.Russell wrote:
it interesting that you should use the biological term disease;
according to a post [1] entitled Re: Re: Smalltalk Data Structures
and Algorithms, by K. K. Subramaniam, dated Mon, 29 Jun 2009
11:25:34 +0530, on the
Peter Verswyvelen wrote:
After my colleague explained me about zippers and how one could derive the
datatype using differential rules, I had to read about it.
So I started reading
http://en.wikibooks.org/wiki/Haskell/Zippers#Mechanical_Differentiation
This page contains the sentence: *For a
Andrew Coppin wrote:
That seems simple enough (although problematic to implement). However,
the Report seems to say that it matters whether or not the bindings are
muturally recursive [but I'm not sure precisely *how* it matters...]
Seriously, check out the classic Milner paper. Of
Hello.
I've tried to combine lazy IO and parsec. The hole process is done by
network.
Currently I have implemented 'short parsers' so I enter them on need. To
update state I have following code:
parser2nntp :: Monad m = NntpParser m a - NntpT m a
parser2nntp p = do s - NntpT (gets $ input .
Andrew Coppin wrote:
Robert Greayer wrote:
f0 _ = (foo True, foo 'x') where foo = id
is well-typed.
Really? That actually works? How interesting... This suggests to me that
where-clauses also do strange things to the type system.
Not too strange, in fact we need it to do that for
On Sun, Jul 19, 2009 at 7:40 AM, wren ng thorntonw...@freegeek.org wrote:
Fernan Bolando wrote:
The intention is z0 is a system parameter and database, it contains a
set of info needed to define a particular simulation
it looks like ( [n,m...], [m,o,p])
n is is a list info settings for the
Fernan Bolando wrote:
The intention is z0 is a system parameter and database, it contains a
set of info needed to define a particular simulation
it looks like ( [n,m...], [m,o,p])
n is is a list info settings for the circuit analysis
m is a list of statistics for the circuits that is need in
37 matches
Mail list logo