I think this is an old bug,
or at least I have seen it months back.
The overlapping instances directive does not make it to the top-level.
See attached sample with the offending session.
Thanks for fixing.
Ralf
Test.hs
Description: Test.hs
___
Ian Lynagh [EMAIL PROTECTED] writes:
ghc-6.4.20050228-src.tar.bz2
I think you have unswapped the first two lines of
ghc -v 21 | head -2 but not changed Reading back to Using, so
old hmakes are still broken (old includes the latest release, I
believe).
There are a couple of other
Hi,
I'm about to rework an old program, and I am pondering what data
structure to use. Basically, I want to store an index of fixed-length
words (q-grams) with positions, i.e. given a word, I can quickly find
its position in the data.
The data set may be large (gigabytes would be nice), and I
On 02 March 2005 02:10, Benjamin Franksen wrote:
I haven't followed this thread too closely so please excuse me if
this has already been mentioned (or even fixed).
After I installed the latest binary package (20050228) the
documentation was not correctly linked from the main documentation
Kip Macy kip.macy at gmail.com writes:
I've followed the instructions to the letter.
Debian has had a working amd64 package of ghc for some time now. It is built
out of the standard source base for it. You can find that at:
http://ftp.debian.org/debian/pool/main/g/ghc6
You'll want to grab
Ralf
You have a pragma -fallow-overlapping-instances in Test.hs, and indeed
it is honoured when compiling Test.hs. But it's not taken into account
when compiling top-level expressions, or, indeed, if you were to import
Test into another module.
If you say :set -falllow-overlapping-instances
In the past having:
{-# OPTIONS -fallow-overlapping-instances #-}
in a module was enough to get ghci to allow the overlaps.
so we do:
ghci Test.hs
now it does not work (but it did in 6.3), but:
ghci -fallow-overlapping-instances Test.hs
does... Even it Test.hs is the top level module.
Keean.
Ah, yes. In 6.2, overlap errors were checked and reported eagerly at
the instance declaration. So
instance C Int a
instance C b Bool
was rejected. Now it isn't. Instead the program is only rejected if a
constraint arises that matches two instance decls, and neither is more
Erm, what is the module context of GHCi? I thought ghci
used the context of the loaded module:
ghci Test.hs
*Test
I though the 'Test' in the prompt indicated you were in the context of
the Test module. In which case the pragma at the top of the test
module should be in force?
Keean.
Simon
It also worked in 6.2
Before that I don't remember.
It is a very sensible thing to do
simply because the mere ghci prompt suggests that
we are in the scope of the top-level module.
So one would really expect that ghci honors the
directives of the top-level module.
Ralf
-Original
Hi Sigbjorn.
| http://www.haskell.org/ghc/dist/stable/dist/ghc-6-4-20050301.msi
| (md5.sig: 0f3be1a0c211194415b2cb8ee579f6e1 ; size: 46M)
Thanks as usual.
I built CVS head GHC with this package and mucked around a little bit. The
only problem I've come across so far is that an objectio
Benjamin Franksen wrote:
On Thursday 24 February 2005 23:27, Keean Schupke wrote:
Well, not quite true, because the type of the label is used to index the
value, the selection happens at compile time. So at run time there is no
instance selection left... it is simply the value. At least in
Hello everybody. I'm using the hs-plugins function eval in my source code and
I need to import a Haskell module at runtime. Do you know if it's possible?
I've seen many examples of hs-plugins and never had a user's module import in
the eval call. Thanks for your time
Has anybody got a good example of how to use linear implicit parameters?
I seem to be unable to understand the description in the ghc manual and
I couldn't find a paper on the web.
Immanuel
***
I can, I can't.
Tubbs
Ben Rudiak-Gould wrote:
It does. An HList of Int,Bool,Char is isomorphic to the type
(Int,(Bool,(Char,(, and selecting the Bool element will ultimately
compile to code like this:
case list of
(_,(x,_)) - ...
It doesn't need to search for the right element at runtime, and it
doesn't
jgarciavivo:
Hello everybody. I'm using the hs-plugins function eval in my source code
and
I need to import a Haskell module at runtime. Do you know if it's possible?
I've seen many examples of hs-plugins and never had a user's module import in
the eval call. Thanks for your time
If I
Deadlines
ExtendedCALL FOR PAPERS IN THREE
SYMPOSIUMS
Symposium -
1
International Symposium of Graphical Models and
Imaging (IV2005-GMAI)http://www.graphicslink.demon.co.uk/IV05/GMAI.htmINThe
9th IEEE International
On Wed, 2 Mar 2005, Ben Lippmeier wrote:
You can play games with the type checker to force them to have the same
type without changing the meaning of your function.
fun1' f (Left x)= if True then Left (f x) else Left x
Left (f x) `asTypeOf` Left x
?
On Wed, 2 Mar 2005, Benjamin Franksen wrote:
There is a good argument for 'distfix' i.e. bracketing operators, IMO. You
could define your own if_then_else:
`if cond `then` truebranch `else` falsebranch end`
I would be more happy with
if :: Bool - a - a - a
if True x _ = x
if False _
On 01 March 2005 11:21, Marcin 'Qrczak' Kowalczyk wrote:
Marcin 'Qrczak' Kowalczyk [EMAIL PROTECTED] writes:
Why is the main thread bound?
I can answer myself: if the main thread is unbound, the end of the
program can be reached in a different OS thread, which may be a
problem if we want
My point was that this code seems excessively complex:
fun::(a-a1)-(Either a b)-Either a1 b
fun f (Left x) = Left (f x)
fun _ r@(Right x)= Right x
I'd like to avoid the destruction and construction in the third line
by replacing the right hand side with r. However, the typechecker
then
Alex,
fun::(a-a1)-(Either a b)-Either a1 b
fun f (Left x) = Left (f x)
fun _ r@(Right x)= Right x
I'd like to avoid the destruction and construction in the third line
by replacing the right hand side with r. However, the typechecker
then claims my type is wrong. How do I fix that?
You
On Wed, 2 Mar 2005 09:20:15 -0500 (Eastern Standard Time), S.
Alexander Jacobson [EMAIL PROTECTED] wrote:
My point was that this code seems excessively complex:
fun::(a-a1)-(Either a b)-Either a1 b
fun f (Left x) = Left (f x)
fun _ r@(Right x)= Right x
I'd like to avoid the
Lemmih,
And you can fix it with some unsafeCoerce# magic. (:
Actually, as I pointed out, the required coercion in perfectly safe,
though not implicit:
coerceRight :: Either a b - Either c b
coerceRight (Right b) = Right b
Regards,
Stefan
___
I'd like to do this sort of thing with types other than Either.
Is there a generic safe coerce function?
-Alex-
On Wed, 2 Mar 2005, Stefan Holdermans wrote:
Lemmih,
And you can fix it with some unsafeCoerce# magic. (:
Actually, as I pointed out, the required coercion in perfectly safe, though
not
On Wed, 2 Mar 2005 15:54:51 +0100, Stefan Holdermans
[EMAIL PROTECTED] wrote:
Lemmih,
And you can fix it with some unsafeCoerce# magic. (:
Actually, as I pointed out, the required coercion in perfectly safe,
though not implicit:
coerceRight :: Either a b - Either c b
coerceRight
Something like:
class Coerce a b where
coerce :: a - b
The class must be in a separate file from the instance so that the compiler
does not determine that a == b for all instances.
instance Coerce a a where
coerce = id
If it turns out the left and right types do not match, you get a
no
Simon Marlow [EMAIL PROTECTED] writes:
I've now implemented a threaded runtime in my language Kogut, based
on the design of Haskell. The main thread is bound. The thread which
holds the capability performs I/O multiplexing itself, without a
separate service thread.
We found that doing this
I need a Monad to represent an internal stack. I mean I've got a lot of
functions which operates on lists and I would not like to pass the list as an
argument everytime.
Could you help me writing this monad? To start, I just need a + function which
will return the sum of the 2 toppest elements
Hello again,
in fact I wrote the following state monad:
--
newtype State state value = State (state - (state, value))
instance Monad (State state) where
return v = State $ \s - (s, v)
State f = k = State $ \s - let (s0, v0) = f s
State g = k v0
On Thu, 2005-03-03 at 02:03 +0100, Sam G. wrote:
I need a Monad to represent an internal stack. I mean I've got a lot of
functions which operates on lists and I would not like to pass the list as an
argument everytime.
Could you help me writing this monad? To start, I just need a +
On Thu, 3 Mar 2005, Sam G. wrote:
I need a Monad to represent an internal stack. I mean I've got a lot
of functions which operates on lists and I would not like to pass the
list as an argument everytime.
Could you help me writing this monad? To start, I just need a +
function which will
Marcin Kowalczyk wrote:
Indeed, my brain is melting, but I did it :-)
Congratulations. How about we found a Bound-thread-induced brain melt
victims' support group?
[...] I have added some optimizations:
I think we had thought of most of these optimizations, but things were
already very complex,
33 matches
Mail list logo