I am investigating mixing FunDeps with the type equality GADT
data Teq a b where Teq :: Teq a a
Basically, I would like to write something like
proof :: (C a b1, C a b2) => Teq b1 b2
proof = unsafeCoerce# Teq
provided the FunDep
class C a b | a -> b
Is this safe? Any caveat?
Re
joelr1:
> Folks,
>
> I have a version of Yampa with Henrik Nilsson's GADT optimizations
> that I cleaned up for ghc 6.6 and cabalized. Would it be possible to
> set it up at darcs.haskell.org and if so how should I go about it?
>
There are some details here:
http://haskell.org/haskellwik
To improve my understanding of GADT, I tried to define a Set datatype,
with the usual operations, so that it can be made a member of the
standard Monad class. Here I report on my experiments.
First, I recap the problem. Data.Set.Set can not be made a Monad because
of the Ord constraint on its
Hi Reto,
On Thu, Dec 21, 2006 at 10:11:22PM -0800, Reto Kramer wrote:
>
> I've tried to thread the two states (StateA and StateB) using a chain
> of StateT ... StateT ..., but couldn't really make that work.
That is how I would write it; I have attached code for your example.
> It
> seems
Hi,
> On the contrary, I think it's an excellent way of learning Haskell.
> I'm writing a lot of useful Haskell code with only one IO action
> (interact). I don't think I could reasonably construct an
> introductory problem that couldn't be solved with it, and I haven't
> yet found an application
Hi
On the contrary, I think it's an excellent way of learning Haskell.
I'm writing a lot of useful Haskell code with only one IO action
(interact). I don't think I could reasonably construct an
introductory problem that couldn't be solved with it, and I haven't
yet found an application for whic
It's true that this is the typical way of learning Haskell, but I for
one think it's a bad way of learning Haskell.
Very few real world programs get by without the "impure" stuff, so if
you give the newbie the impression that it isn't there (by postponing
it) there's a chance he'll run into a sit
Hi,
> It's true that this is the typical way of learning Haskell, but I for
> one think it's a bad way of learning Haskell.
> Very few real world programs get by without the "impure" stuff, so if
> you give the newbie the impression that it isn't there (by postponing
> it) there's a chance he'll r
Or you could ignore the problem of shutdown altogether:
http://swig.stanford.edu/~candea/papers/crashonly/
On Jan 2, 2007, at 12:20 PM, Chris Kuklewicz wrote:
Mark Goldman wrote:
I am trying to write a toy echo server that can handle multiple
connections. I would like to be able to test a
Quoting Udo Stenzel <[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] wrote:
>
> It isn't, but not for the reasons you might suspect. You're using
> 'nub', which is quadratic, and your 'coupage' is also quadratic because
> it uses 'lookup' on a list, which is linear, a linear number of times.
> You can ge
On 1/3/07, David House <[EMAIL PROTECTED]> wrote:
On 03/01/07, Seth Gordon <[EMAIL PROTECTED]> wrote:
> So I can't just tell someone who's just starting to learn Haskell that
> "f $ g y" is equivalent to "f (g y)"; I have to say "those two are
> *almost always* equivalent, but if you use $ and th
Joel Reymont <[EMAIL PROTECTED]> wrote:
I'm after Erlang in Haskell, if you will, for fault-tolerance and
scalability.
I think the way to do Erlang in Haskell is to build a middleware layer
on top of the language, not try to make the language into something it
is not. In this kind of envi
David House wrote:
>
>> So I can't just tell someone who's just starting to learn Haskell that
>> "f $ g y" is equivalent to "f (g y)"; I have to say "those two are
>> *almost always* equivalent, but if you use $ and the compiler complains
>> about not being able to match the expected and the infe
Folks,
I have a version of Yampa with Henrik Nilsson's GADT optimizations
that I cleaned up for ghc 6.6 and cabalized. Would it be possible to
set it up at darcs.haskell.org and if so how should I go about it?
Thanks, Joel
--
http://wagerlabs.com/
_
On 03/01/07, Seth Gordon <[EMAIL PROTECTED]> wrote:
So I can't just tell someone who's just starting to learn Haskell that
"f $ g y" is equivalent to "f (g y)"; I have to say "those two are
*almost always* equivalent, but if you use $ and the compiler complains
about not being able to match the e
[EMAIL PROTECTED] wrote:
Calvin Smith wrote:
When the problem occurs, there is a message to the console that says:
"thread blocked indefinitely".
I can reproduce this on OS X with ghc-6.4.2, X11-1.1 and HGL-3.1. The
console message is rare but I also got it once. This looks like a bug in
HGL,
Simon Peyton-Jones wrote:
> Conor and others are right; it's all to do with type inference. There is
> nothing wrong with the program you are writing, but it's hard to design a
> type inference algorithm that can figure out what you are doing.
>
> The culprit is that you want to instantiate a p
Yitzchak Gale wrote:
> Here is a concrete example:
>
> Let's say you want to shuffle a large list randomly,
> within a larger application that lives inside some
> MTL monad stack. Among other things, your monad
> m satisfies (RandomGen g, MonadState g m), perhaps
> after a lift.
>
> Well, it turn
18 matches
Mail list logo