On Mon, Nov 1, 2010 at 4:30 AM, Mario Blažević mblaze...@stilo.com wrote:
Before uploading a new version of my project on Hackage, I decided to
future-proof it against GHC 7.0. I ran into several compile errors caused by
the changes in let generalization, but these were easy to fix by
On 31 October 2010 23:05, Gregory Collins g...@gregorycollins.net wrote:
They're called difference lists:
Andy Gill and Graham Hutton's first worker wrapper paper calls then
Hughes lists.
This seems more apt to me than difference lists as difference lists
(in the Haskell formulation at least*)
Chris
What you are observing is the effects of the delay on the operation of
the TCP stacks and the way your 'sleep' works.
You are introducing delay (the sleep time is a 'minimum' and then at
least one o/s jiffy) - that represents one limit. The other limit is
delay/bandwidth product of
Malcolm Wallace wrote:
Nils Schweinsberg wrote:
Vo Minh Thu wrote:
So you have to either factorize you parsers or use
the 'try'.
This is exactly what gives me headaches. It's hard to tell where you
need try/lookAhead and where you don't need them. And I don't really
feel comfortable
To simplify, the difference in persistence between the two
representations is enough to consider them very different
as it makes a dramatic difference in interface.
Interesting discussion. I still think it is the same idea,
namely to represent not-yet-known list tails by variables,
embedded
On 31/10/2010 16:55, Brent Yorgey wrote:
Note that the first parameter to commutative shadows the previous
definition of com, I don't know if that's what you intended.
Does the following avoid the shadowing?
infixl 5 `op`
op :: Int - Int - Int
x `op` y = (x + y)
commutative op1 = \a b - (a
Yes, that would prevent the shadowing. But now you are ignoring the
argument op1. Choosing a name that is more different from 'op' might
be helpful. You can even invent your own operator as an argument to
your commutative function:
commutative (⊕) = \a b - (a ⊕ b) == (b ⊕ a)
On Mon, Nov 1,
Hi Haskellers. I'm trying to read a text file using GHCi on Haskell Platform
2010.2.0.0. The import line in my program is import Text.Regex. When I run
:main it says unknown symbol `_regerror' and unable to load package
`regex-posix-0.94.2'. Any clues on how fix this problem? Please let
Hi,
There's nothing wrong with your type families. The problem is that the compiler
doesn't know that the m and rsc of eval are the same as m and rsc of runLoader.
(Also you had a small bug in the type of eval)
You need the ScopedTypeVariables extension, with a forall on runLoader to tell
GHC
On 1 November 2010 23:36, Dan Bensen danben...@att.net wrote:
Hi Haskellers. I'm trying to read a text file using GHCi on Haskell
Platform 2010.2.0.0. The import line in my program is import Text.Regex.
When I run :main it says unknown symbol `_regerror' and unable to load
package
On 2010-10-30 08:11 -0700, Mark Lentczner wrote:
1) HTML supports the concept of alternate style sheets. If present,
then the idea was that browsers would give the user the choice,
somewhere, to choose among them. While Firefox does this (View Page
Style),
The implementation in Firefox is
See this conclusion of this thread - installing the latest version
from Hackage seems to be the solution:
http://www.haskell.org/pipermail/haskell-cafe/2010-August/082141.html
Note that although regex-posix is a binding to a C library, because
the library and headers are delivered with the
I know there's a .cabal file for the latest version of HP somewhere,
but I can't coerce Google into finding me a link that actually works.
Furthermore, the following page:
http://hackage.haskell.org/platform/contents.html
does list all the contents, but to my big surprise it doesn't link to
the
magnus:
I know there's a .cabal file for the latest version of HP somewhere,
but I can't coerce Google into finding me a link that actually works.
Furthermore, the following page:
http://hackage.haskell.org/platform/contents.html
does list all the contents, but to my big surprise it
I had the exact same problem in my regional-pointers package in the
withArray function:
withArray ∷ (Storable α, MonadCatchIO pr)
⇒ [α]
→ (∀ s. RegionalPtr α (RegionT s pr) → RegionT s pr β)
→ pr β
I had to replace the original:
withArray vals =
Stack Overflow and Reddit are at least improvements over the traditional
web forums, starting to acquire some of the features Usenet had twenty
years ago. Much like Planet-style meta-blogs and RSS syndication makes
it liveable to follow blogs.
Very much this. I mourn Usenet's potential as
On Mon, Nov 1, 2010 at 14:47, Don Stewart d...@galois.com wrote:
magnus:
I know there's a .cabal file for the latest version of HP somewhere,
but I can't coerce Google into finding me a link that actually works.
Furthermore, the following page:
On 29-10-10 22:20, Aaron Gray wrote:
On 27 October 2010 13:30, Martijn Schrage mart...@oblomov.com
mailto:mart...@oblomov.com wrote:
On 21-10-10 01:01, Victor Nazarov wrote:
This example creates a text field that turns red if it contains
any non-digit characters. It is on-line at
Hello.
I'd like to have a template haskell function that take some constraints and
a class name and write an empty class from those and relative empty instance
to simulate typeclass synonyms.
As I've never written TH and couldn't find a easily adaptable code around, I
ask here for the code, or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/30/10 06:55 , Patrick Browne wrote:
-- Question 1
-- commutative com 1 3
-- This also gives true. Is it because of commutative equation or
because of the plus operation?
Haskell doesn't know about commutativity; you got true because (+)
I'd like to install the GHC 7.0.1 RC on my mac (Snow Leopard, x86_64),
but I don't want it to run over my current GHC 6.12.2 install.
If I use the .pkg installer, it doesn't allow me to select the
destination, and I worry that it will overwrite my 6.12.2 install.
If I try to build from source,
On 1 November 2010 17:53, Paolino paolo.verone...@gmail.com wrote:
I'd like to have a template haskell function that take some constraints and
a class name and write an empty class from those and relative empty instance
to simulate typeclass synonyms.
As I've never written TH and couldn't
On 1 November 2010 09:55, Neil Davies semanticphilosop...@gmail.com wrote:
How accurate do you need this control of throughput? To get really accurate
rates we had to write our own specialist rate regulated thread library which
accounts for any scheduling delay and can even spin if you want low
On Mon, Nov 1, 2010 at 6:09 PM, Christopher Done
chrisd...@googlemail.com wrote:
On 1 November 2010 17:53, Paolino paolo.verone...@gmail.com wrote:
I'd like to have a template haskell function that take some constraints and
a class name and write an empty class from those and relative empty
Thanks. I annotated the function
http://hpaste.org/paste/41035/test_simpleclasssynonym
It seems to produce the right code.
How should I use the Parents synonym in my functions?
This is a noob question I suppose.
paolino
2010/11/1 Gábor Lehel illiss...@gmail.com
On Mon, Nov 1, 2010 at 6:09
I'm toying with generating random objects (for example tuples) and
started wondering what pearls of wisdom Cafe might have on the matter.
Two obvious points (relating to my toy code, shown below) are
1) The meaning of the limits required by randomR is not obvious for
types such as tuples
On Mon, Nov 1, 2010 at 12:07 PM, Edward Amsden eca7...@cs.rit.edu wrote:
I'd like to install the GHC 7.0.1 RC on my mac (Snow Leopard, x86_64),
but I don't want it to run over my current GHC 6.12.2 install.
If I use the .pkg installer, it doesn't allow me to select the
destination, and I
On Monday 01 November 2010 19:18:33, Jacek Generowicz wrote:
I'm toying with generating random objects (for example tuples) and
started wondering what pearls of wisdom Cafe might have on the matter.
Two obvious points (relating to my toy code, shown below) are
1) The meaning of the limits
I'm using Safari on Snow Leopard.
On the Browse Users page on Haskellers,
there are little buttons that look like number spinners
on the two numerical fields, like Using Haskell since...
When I press one of those, the number
-1.7976931348623157e+308 appears in the field.
That must be Lennart.
On 2010-11-01 19:18 +0100, Jacek Generowicz wrote:
I'm toying with generating random objects (for example tuples) and
started wondering what pearls of wisdom Cafe might have on the matter.
Two obvious points (relating to my toy code, shown below) are
1) The meaning of the limits required
On Monday 01 November 2010 19:55:22, Nick Bowler wrote:
On 2010-11-01 19:18 +0100, Jacek Generowicz wrote:
I'm toying with generating random objects (for example tuples) and
started wondering what pearls of wisdom Cafe might have on the matter.
Two obvious points (relating to my toy code,
On 2010-11-01 20:09 +0100, Daniel Fischer wrote:
On Monday 01 November 2010 19:55:22, Nick Bowler wrote:
That being said, there is an Ord instance for tuples (a
lexicographic ordering) and for this case I think it would make the
most sense to use that: select an element from the set
{ x :
Yes, I did make a small mistake in the type of eval.
In fact, through the compiler messages, I guessed that it was a problem of
matching between the 'rsc' type variable of runLoader and the 'rsc' of eval.
I thought that this kind of matching was automatic in Haskell, well I was
wrong... Thanks !
Hi Yves,
On 11/01/2010 09:44 PM, Yves Parès wrote:
Yes, I did make a small mistake in the type of eval.
In fact, through the compiler messages, I guessed that it was a problem of
matching between the 'rsc' type variable of runLoader and the 'rsc' of eval.
I thought that this kind of matching
Just out of curiosity: Does it work if you omit eval's type signature?
In fact you can't omit it since EDSL is a GADT.
I don't know why there is this restriction, but it is written in
operational's documentation:
I think I've got something nice in the end.
http://hpaste.org/41042/classsynonymhs
example:
class (ParteDi (Servizio a) s
,Read a
,Eq a
, Show a
, Integer `ParteDi` s
) = SClass s a
$(classSynonym ''SClass)
ghci :i SClass command is
On 31/10/2010 04:15 PM, Nils Schweinsberg wrote:
This is exactly what gives me headaches. It's hard to tell where you
need try/lookAhead and where you don't need them. And I don't really
feel comfortable wrapping everything into try blocks...
I vaguely recall somebody mentioning a parser
The other day, I accidentally came up with this:
|{-# LANGUAGE RankNTypes #-}
type Either x y= forall r. (x - r) - (y - r) - r
left :: x - Either x y
left x f g= f x
right :: y - Either x y
right y f g= g y
|
This is one example; it seems that just about any algebraic type can
Looks a lot like Church encoding to me:
http://en.wikipedia.org/wiki/Church_encoding
It was first discovered by the guy who invented lambda calculus :p
- jeremy
On Nov 1, 2010, at 5:28 PM, Andrew Coppin wrote:
The other day, I accidentally came up with this:
{-# LANGUAGE RankNTypes #-}
On Mon, 1 Nov 2010, Andrew Coppin wrote:
The other day, I accidentally came up with this:
{-# LANGUAGE RankNTypes #-}
type Either x y = forall r. (x - r) - (y - r) - r
left :: x - Either x y
left x f g = f x
right :: y - Either x y
right y f g = g y
This is one example; it seems that just
On 1 November 2010 22:18, Andrew Coppin andrewcop...@btinternet.com wrote:
I vaguely recall somebody mentioning a parser library on Hackage where
try is the default behaviour and you turn it off explicitly, rather than
turning it on explicitly. Apparently this is much more intuitive. But
On Monday 01 November 2010 6:40:30 pm Jeremy Shaw wrote:
Looks a lot like Church encoding to me:
http://en.wikipedia.org/wiki/Church_encoding
It was first discovered by the guy who invented lambda calculus :p
Also, if you're interested in this, you can read Proofs and Types by Girard
(not
2010/11/1 Paolino paolo.verone...@gmail.com:
I think I've got something nice in the end.
http://hpaste.org/41042/classsynonymhs
example:
class ( ParteDi (Servizio a) s
, Read a
, Eq a
, Show a
, Integer `ParteDi` s
) ⇒ SClass s
I took a quick look on hackage for an interface to windows networking
function calls, and didn't find anything that worked. I may have
overlooked something. What's the state of windows network programming?
Any recommendations for a good package?
___
Have you tried the 'network' package on Hackage? I had thought it was
cross-platform. I do not do much development on Windows.
On Nov 1, 2010 6:45 PM, Michael Litchard mich...@schmong.org wrote:
I took a quick look on hackage for an interface to windows networking
function calls, and didn't find
On Mon, Nov 1, 2010 at 7:04 PM, Antoine Latter aslat...@gmail.com wrote:
Have you tried the 'network' package on Hackage? I had thought it was
cross-platform. I do not do much development on Windows.
On Nov 1, 2010 6:45 PM, Michael Litchard mich...@schmong.org wrote:
I took a quick look on
Hey everyone,
This is a little off-topic, but I just ran into a problem which might
benefit from being attacked by a logic language, so I've been looking
for a good one to try out --- and hopefully one that has a very
efficient implementation since I want to iterate through billions and
This one is easy:
-- | Class describing a resource of type @rsc@
class (Ord (IdOf rsc)) = Resource rsc where
type IdOf rsc
type LocOf rsc
type CfgOf rsc
retrieveLoc :: CfgOf rsc - IdOf rsc - LocOf rsc
load :: LocOf rsc - IO (Maybe rsc)
-- ^ Called when a resource needs to
On 2/11/2010, at 1:27 PM, Gregory Crosswhite wrote:
Hey everyone,
This is a little off-topic, but I just ran into a problem which might benefit
from being attacked by a logic language,
Why not describe the problem?
so I've been looking for a good one to try out --- and hopefully one
Hi all,
is there something special about let? I don't mean only its use in
haskell, but in the general context of programming languages.
I've been given a few hints over time when I asked question concerning
DSLs but regretfully didn't follow them up.
Günther
2010/11/2 Günther Schmidt gue.schm...@web.de:
Hi all,
is there something special about let? I don't mean only its use in
haskell, but in the general context of programming languages.
It means whatever the language specification/definition/implementation
says it means. It's usually used for
On 11/01/2010 06:19 PM, Richard O'Keefe wrote:
On 2/11/2010, at 1:27 PM, Gregory Crosswhite wrote:
Hey everyone,
This is a little off-topic, but I just ran into a problem which might benefit
from being attacked by a logic language,
Why not describe the problem?
My goal is to
On 1/11/2010, at 10:37 PM, Claus Reinke wrote:
Interesting discussion. I still think it is the same idea,
namely to represent not-yet-known list tails by variables,
embedded into two different kinds of languages.
\rest-start++rest
[start|rest]\rest-- '\' is an infix
As syntax, let goes back at least to ISWIM.
As for there being something special, Milner's algorithm for
type checking/inference in SML had to treat let specially.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Alright, I've brushed up on my HTML5 form fields a bit and added
appropriate min, max and step attributes for those fields, as well as
the Haskeller since field in the profile. Let me know if you still
have any problems with it.
Thanks,
Michael
On Mon, Nov 1, 2010 at 8:47 PM, Yitzchak Gale
55 matches
Mail list logo