On Tue, 19 Oct 2004 15:56:01 +0100 (BST), MR K P SCHUPKE
[EMAIL PROTECTED] wrote:
* I'm not at all keen on making '..deriving( Foo )' mean
$(derive 'Foo) or something like that. Just make the TH
call yourself!
The current situation is that the code that generates the derived
| Why not even simply
|
| instance Typeable (T a)
|
| In other words, derivable classes define default
| implementations for all their methods.
But that has an existing meaning! It means use the default methods for
all methods of the class. Which is not the same as derive all
methods.
It'd
deriving instances will only work for
a) known/builtin classes (like Typeable, Eq, Show, etc)
b) datatypes T that are defined elsewhere using data (or newtype) where
the corresponding deriving clause is missing.
HTH Christian
MR K P SCHUPKE wrote:
instance Typeable (T a)
Forgive my stupid
| Why not even simply
|
| instance Typeable (T a)
|
| In other words, derivable classes define default
| implementations for all their methods.
But that has an existing meaning! It means use the default methods for
all methods of the class. Which is not the same as derive all
Hello,
[Excuse me for moving this discussion to the ghc mailing list,
but it seems the appropriate place, seeing as ghc is where
any solution will happen first in all probability.]
I've noticed that the neither of the two Simons has expressed an
opinion re. the discussions on this issue that
On 19 October 2004 17:08, Peter Simons wrote:
The following reproducibly fails:
$ darcs get http://cryp.to/hsdns [*]
$ cd hsdns/
$ hsc2hs ADNS.hsc
$ ghc -threaded -Wall -O --make test.hs -o test -ladns
| Chasing modules from: test.hs
| Compiling ADNS (
As posted on this list, there is template-haskell code to do:
$(derive [| data Foo = Foo |])
You can also get the type of Foo in TH by doing:
dummy :: Foo
dummy = undefined
$(derive2 dummy)
and the code for derive2 reify's the argument, which then gives the
reflected type... so the example
What replaces 'gensym' in GHC 6.3?
Keean.
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
On 20 October 2004 14:36, Adrian Hey wrote:
[Excuse me for moving this discussion to the ghc mailing list,
but it seems the appropriate place, seeing as ghc is where
any solution will happen first in all probability.]
I've noticed that the neither of the two Simons has expressed an
opinion
The darwin ports version appears not to be too happy just now...
Error: Target com.apple.build returned: shell command cd
/Users/tatd2/darwinports/dports/lang/ghc/work/ghc-6.2.2 make all
returned error 2
Command output: In the definition of `remInteger':
remInteger
Hi Tom,
If this isn't just running out of disk space, let me know your hardware
configuration
and Xcode versions (uname -a, processor type and total amount of
memory, gcc3 -v).
So far, all of the reported problems building 6.2.2 under darwinports
have been related
to Apple's gcc3 (i.e.,
Lots of schemes have been discussed. The one I understand best is:
* Modules can contain top-level bindings like
x - e
where e:: IO t, and x::t
* The IO actions from these bindings are composed, in order of
appearance,
and together comprise the module initialisation action
* When
Thanks for the URL... I have realised I jumped the gun saying the derivation can be
done in template-haskell... there is one small problem:
$(derive [t| SomeConstructor a b |])
passes the constructor to derive... is there any way to get the type information
for some type? You can do
$(derive
Hi,
the GHC version from the current CVS HEAD aborts with an
internal error when doing this:
$ darcs get http://cryp.to/hsemail
$ cd hsemail
$ ghc -O2 --make -o message-test message-test.hs
| Chasing modules from: message-test.hs
| Compiling Rfc2234 ( ./Rfc2234.hs, ./Rfc2234.o )
|
Simon Marlow writes:
$ ghc -threaded -Wall -O --make test.hs -o test -ladns
Should be fixed now.
Just updated to the new version and tried it: The error is
gone. Thank you very much.
Peter
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
On Tue, Oct 19, 2004 at 08:08:49PM +0200, Andres Loeh wrote:
Simon Peyton-Jones wrote:
derive( Typeable (T a) )
But that means adding 'derive' as a keyword. Other possibilities:
deriving( Typeable (T a) )
...
Any other ideas?
instance Typeable (T a) deriving
Why
On Wednesday 20 Oct 2004 3:46 pm, Simon Marlow wrote:
I liked the original idea. I'm not sure if I agree with the argument
that allowing fully-fledged IO actions in the initialisation of a module
is unsafe. I agree that it is a little opaque, in the sense that one
can't easily tell whether a
17 matches
Mail list logo