I'm not sure whether you are saying (a) or (b):
a) This is a compiler bug; even with -fno-monomorphism-restriction
the module should compile. Are you sure?
b) this is a feature request: you want a flag -fmonomorphism-restriction
to restore the monomorphism restriction even if
Use -fallow-incoherent-instances to use the first choice above)
This flag should be added to the flag reference list:
http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#AEN5847
Christian
___
Glasgow-haskell-users mailing
Simon Peyton-Jones wrote:
I'm not sure whether you are saying (a) or (b):
a) This is a compiler bug; even with -fno-monomorphism-restriction
the module should compile. Are you sure?
b) this is a feature request: you want a flag -fmonomorphism-restriction
to restore the
I wrote
| If someone wants to reproduce the error, do the following:
| 1) check out HetCATS repository with:
| cvs -d pserver:[EMAIL PROTECTED]:/repository
co
| HetCATS
| 2) comment out variable HC_PACKAGE in the Makefile (to avoid
dependency
| from uni)
| 3) add the flag
Ah, I see... Thats basically the same problem as overlapping instances
then...
(Which we have - but I try to avoid except where unavoidable...). Still,
It seems
it could be a good 'optional' feature.
Keean.
Lennart Augustsson wrote:
Keean Schupke wrote:
Daan Leijen wrote:
You are right, I
Tomasz Zielonka wrote:
On Thu, Nov 25, 2004 at 07:52:43PM +0100, Lennart Augustsson wrote:
As I'm sure you have gathered from all the answers you can't have the
latter and keep Haskell pure. But there is an interesting alternative
(at least theoretically). You could have a function like
On Thursday 25 Nov 2004 4:53 pm, Keean Schupke wrote:
Thanks Adrian, for some reason I did not get the original reply to this
post.
This was my point, I may _want_ two copies of the library. Lets say I
want to
write a virtual machine emulator in haskell, and I then wish to use your
library
Adrian Hey wrote:
Well it can be written in Haskell, but not using a module that was
specifically designed to prevent this.
Well, It can be written in Haskell as it stands at the moment... This
proposal
would break that...
You want the library programmer to have final say.
I want the library
At 19:14 25/11/04 +0100, Lennart Augustsson wrote:
Graham Klyne wrote:
I have a concern with this, if I understand the issue correctly.
Suppose I have a source module that compiles and runs correctly.
Now suppose I add a restricted (selective) import statement to the file,
explicitly introducing
Genuinely inspiring though it is to observe the vitality of the Haskell
community, especially by comparison with we taciturn SML folks, recent
discussions on top-level initialization etc. have got a bit high-bandwidth for
the casual lurker. I really don't want to unsubscribe, so might I
Stefan Monnier wrote:
I have recently taken over maintainership of Haskell-mode, and after making
a bunch of changes, I figured it would be a good idea to make a new release.
You can find this new release at:
http://www-perso.iro.umontreal.ca/~monnier/elisp/
Thank you!
This release has
On Friday 26 Nov 2004 11:39 am, Keean Schupke wrote:
Adrian Hey wrote:
Well it can be written in Haskell, but not using a module that was
specifically designed to prevent this.
Well, It can be written in Haskell as it stands at the moment...
No it can't. If I have a device driver that's
While playing with the new mode I discovered a small deficiency in the menu
Declarations - Imports (that I've never used before). The names of the
imported modules are cut off after the first dot. Instead of
i.e. Data.List only Data is displayed. (There may be several dots in
a module name.)
Hi,
thanks for you work! The indentation works much better than before. However, I
have some feature requests/bugs:
- indentation in do monad: lines after let should have 2 possible
indentations. One for new let bindings (how it is currently) and one for further monad
expressions. Example:
thanks for you work! The indentation works much better than
before. However, I have some feature requests/bugs:
- indentation in do monad: lines after let should have 2 possible
indentations. One for new let bindings (how it is currently) and one for
further monad expressions. Example:
On Fri, 26 Nov 2004 16:38:26 -0500, Stefan Monnier [EMAIL PROTECTED] wrote:
thanks for you work! The indentation works much better than
before. However, I have some feature requests/bugs:
- indentation in do monad: lines after let should have 2 possible
indentations. One for new let bindings
On Wed, Nov 24, 2004 at 01:34:31AM -0800, John Meacham wrote:
Part of my current interest in #2 is that I have been experimenting with
some full-program optimization algorithms which could perhaps give
substantial gains but would pretty much obliterate any uses of the
unsafePerformIO global
Hi,
let me answer your questions by comparing what's implemented in Chameleon.
(For details see
http://www.comp.nus.edu.sg/~sulzmann/chameleon/download/haskell.html#scoped)
QUESTION 1 -
In short, I'm considering adopting the Mondrian/Chameleon rule for GHC.
There are two
Martin Sulzmann wrote:
[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
Lennart Augustsson writes:
[...]
But using functional dependencies feels like a sledge hammer,
and it is also not Haskell 98.
Well, I'm simply saying that your proposed extension which is not
Haskell 98 can be expressed in terms of a known type class extension.
I agree that
Martin Sulzmann wrote:
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 t
The cases I was looking at had more than one instance, but thats
cool! (I didn't realise
Seeing as we are taling about type class extensions, can you see any
problems
with the following...
class X x
instance Int
instance Float
instance x
Here we have overlapping instances... (bad), but if we look at the cases
there
is one which will match 'x' but never any of the others... that is
On Fri, 26 Nov 2004, George Russell wrote:
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
[EMAIL PROTECTED] wrote:
(initialising by wish)
This indeed can't be proved central+affine, because it isn't. So instead,
choose one of the following:
1 (Good) Indirection:
declare gc - newIORef None; so that gc is a global variable holding a
(Maybe GraphicsContext). Initialise the
I've replied to the cafe, as per requests...
Peek and poke are instances of the Storable class, I can
re-implement storable, and provide the alternative definition
by giving ghc some -isomething arguments. I don't even
need to recompile your module, simply providing the alternate
Storable module
[for the 4th time moving this discussion to cafe]
On Friday 26 November 2004 08:39, you wrote:
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 ...
On 26 Nov 2004, at 12:08, George Russell wrote:
Yes, you need to explicitly initialise it; but you don't need then
to
pass the initialized handle all around your code. The painful
plumbing
goes away.
I think this is either unwieldy or inefficient. Imagine a large library
containing lots
On Friday 26 November 2004 14:12, Benjamin Franksen wrote:
I still can't see any reason why each single Haskell thread should have its
own searate dictionary. Contrary, since it is common to use forkIO quite
casually, and you expect your actions to do the same thing regardless of
which thread
On Fri, 26 Nov 2004, Jules Bean wrote:
On 26 Nov 2004, at 12:08, George Russell wrote:
Yes, you need to explicitly initialise it; but you don't need then to
pass the initialized handle all around your code. The painful plumbing
goes away.
I think this is either unwieldy or inefficient.
Keean Schupke wrote:
[...] I don't even need to recompile your module, simply providing
the alternate Storable module at link time is sufficient. [...]
[ Completely off-topic for this thread ] But this *won't* work in the
presence of cross-module inlining, e.g. when you are using GHC with
-O or
Hi,
Sven Panne wrote:
Keean Schupke wrote:
[...] I don't even need to recompile your module, simply providing
the alternate Storable module at link time is sufficient. [...]
[ Completely off-topic for this thread ] But this *won't* work in the
presence of cross-module inlining, e.g. when you are
I finally understood that George Russell's Library is not really about global
variables. Rather it is about what I want to call 'execution contexts', which
are -- as Marcin Kowalczyk observed -- a restricted form of dynamically
scoped variables.
[NB: Another (maybe better) name would have been
Simon Peyton-Jones wrote:
In GHC at present, a separate type signature introduces no scoping. For
example:
f :: forall a. a - a
f x = (x::a)
would be rejected, because the type signature for 'f' does not make
anything scope over the right-hand side, so (x::a) means
33 matches
Mail list logo