This is funny. When I got no immediate reaction from you, I started
implementing it myself. I ended up with something similar. It has less
features but is also a lot simpler. This is the interface:
initGlobal :: Typeable a = a - IO ()
getGlobal :: Typeable a = IO a
Your implementation is
Let me just begin by sharing my experience with scoped type variables. I've
found them very useful in a project were I was to generalize a substantial
code base. Many of the functions had local definitions whose type were
simply not expressible without scoped type variables. During this work I
George Russell [EMAIL PROTECTED] writes:
Your implementation is probably much simpler than mine because
you don't implement withEmptyDict. I'm really quite keen about
withEmptyDict, because one of the MAJOR conceptual problems I have
with unsafePerformIO global variables is that you only get
On 25 Nov 2004, at 10:07, [EMAIL PROTECTED] wrote:
Way back in this thread, Koen Claessen mentioned the idea of a
commutative
version of the IO monad for handling things with identity. That
doesn't quite
do it, but I have a refinement that might. The thing is to focus on IO
computations that
On Thu, 25 Nov 2004, Jules Bean wrote:
On 25 Nov 2004, at 10:07, [EMAIL PROTECTED] wrote:
Thus an element u of (IO a) is affine central if for all v::IO b and
w::IO c,
do { x - u; v } = v(affine)
If x does not occur in v, I presume?
Yes, and
Hi all,
At osdir there is a nice interview with David Roundy about darcs, the
revision control system written in Haskell. He has a few comments about
Haskell as well. Read it here:
http://osdir.com/Article2571.phtml
This was also covered on /. (which is where I found it).
/Josef
On Thursday 25 November 2004 10:02, you wrote:
This is funny. When I got no immediate reaction from you, I started
implementing it myself. I ended up with something similar. It has less
features but is also a lot simpler. This is the interface:
initGlobal :: Typeable a = a - IO ()
Ian Stark wrote (snipped):
Way back in this thread, Koen Claessen mentioned the idea of a commutative
version of the IO monad for handling things with identity. That doesn't quite
do it, but I have a refinement that might. The thing is to focus on IO
computations that are:
a) central --
Marcin wrote (snipped):
I think global variables are a lot less evil if they behave as if they
were dynamically scoped, like Lisp special variables.
That is, there is a construct which gives the variable a new mutable
binding visible in the given IO action. It's used more often than
Benjamin Franksen wrote (snipped):
Doesn't that run contrary to Adrian Hey's oneShot example/requirement?
Remind me again what Adrian Hey's oneShot example/requirement is ...
Well, that's indeed one major problems with global variables. Sure, you can
try to solve it with multiple dictionaries,
[Discussion moved from Haskell to Haskell-Cafe]
Hi,
Regarding
- lazy overlap resolution aka unique instances
Well, if there's only instance which is not exported, then you can
use functional dependencies.
Assume
class C a
instance ... = C t
Internally, use
class C a | - a
instance ... = C
11 matches
Mail list logo