into some header file that everyone eats.
make clean; make
You can generate the list by hand or have it rebuilt by make every time.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow
I'd like to see us support more debugging
information, preferably in a way that can be stripped from a binary.
The easy way would be as .stabs entries since that's what gdb uses.
However, stabs entries themselves are absolutely horrible (the design
obviously started simple and acquired a
don't know how effective it was or what the
interesting issues were but there's plenty of papers/ research reports about
Yale's strictness analysis and optimization.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http
memory management techniques
(reference counting, etc.) Of course, there's a problem if you have C
function pointers generated using '' in C and function pointers generated
using dynamic wrappers in Haskell. There's no reliable way to tell them
apart.
--
Alastair Reid
thread a chance to run by calling
Control.Concurrent.yield before exiting:
http://etudiants.insia.org/~jbobbio/pafp/docs/base/Control.Concurrent.html#v%
3Ayield
That is, call yield just after calling performGC.
--
Alastair Reid
___
Glasgow-haskell
threads.
I think there's a reason why GHC gives the main thread special status though.
They certainly went to some effort to give it special status so I guess there
must be a good reason that they did so?
--
Alastair Reid
___
Glasgow-haskell-users mailing
potentially finalize an
object before its last use because one of the other finalizers uses it.
To fix this, you have to run the finalizers in the right order but how can
you tell what the right order is?
--
Alastair Reid
___
Glasgow-haskell-users mailing
there is a newForeignPtr that is easier to use:
But, sadly, not portable.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
exclusively, there would have been less choice so we'd have been more
focused.)
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
makeStableNamezh_fast).
How can I proceed? Can I pass some flag to the linker or such to force
them to behave as I want?
Does passing the flag RTLD_GLOBAL to dlopen help? (man dlopen for info about
this flag)
--
Alastair Reid
___
Glasgow-haskell
#a ( a='a', b=True )
'a'
Trex #b ( a='a', b=True )
True
Documentation is here:
http://cvs.haskell.org/Hugs/pages/hugsman/exts.html#sect7.2
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo
the Haskell
garbage collector finds it can't access them from the Haskell heap. Not
really hard to do - just need to be careful.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow
.
--
Alastair Reidhaskell-consulting.com
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
doesn't
directly support) and the size would still be the same because all you
are doing is passing a pointer to the object.
--
Alastair Reidwww.haskell-consulting.com
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org
The problem was whether DiffArrays should be thread-safe in the
Concurrent Haskell sense, which means protecting access to the DiffArray
with an MVar.
Can you give some estimate of the cost of using an MVar in this way?
Could some cheaper mechanism be provided for the special case of a
, the Java
community has done a lot of work on how to make it cheap to take an
uncontested lock but more expensive to take a contested lock.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo
almost
never used in multi-threaded situation.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
concerns portability of type
representations between architectures with different word sizes
and different endianness.
Good answers probably exist for the type sharing problem
(it's a well-studied area). The main problem will be picking
among the different choices.
--
Alastair Reid
(but not enough).
--
Alastair Reidwww.haskell-consulting.com
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
differences like
this.)
--
Alastair Reidwww.haskell-consulting.com
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
a per-module option is not
viable.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
exist.
3) Warn if any occurences of hugs_PMF remain and report any
runtime failures that miss hugs_PMF as compiler bugs.
I never implemented this but I think it would work well.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL
to build thunks that look like
this:
1+1+1+1+ + 1 + 0
which take O(n) heap to store and O(n) stack to evaluate (with constant
factors of around 10-20).
If you've already tried this approach, the tolols SimonM mentions are well
worth using.
--
Alastair Reid
.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
a slowdown by a factor of 2-10 (depending on whether
you interpret or compile) so this might not suit your needs.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
On Thursday 19 June 2003 11:06 am, Malcolm Wallace wrote:
As I see it, the main problem is reproducing all the keybindings.
I'm certain that every user of readline has their own habitual set
of emacs keystrokes that differs slightly from everyone elses, so
inevitably the full complement will
Alastair: Thanks a lot for the detailed reply! I'll take a look at the
build again; maybe I can get this problem fixed after all.
The attached diff (about to be committed) seems to fix the problem.
--
Alastair? gc-3.00
? distrib/html/old_index.html
? lib/Foreign/GreenCard.p_hi
?
that, in the absence of a more flexible module
system, renaming the lazy st monad seems sensible.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
calls. The problem is that this isn't as portable as
using select.
Hope this helps.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
SELECT(2) Linux Programmer's Manual SELECT(2
.]
And does GHC or anybody else support 64bit address spaces?
I think Hugs does but it would be worth checking explicitly.
I'd pay particular attention to the Ptr type in the ffi libraries.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting
. Assuming that the 1st argument to 'NOTE' is a literal string
in the following:
#ifdef TRACK_NOTES
#define NOTE(x,y) (_scc_ NOTE x (y))
#else
#define NOTE(x,y) {- nothing -}
#endif
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED
Haskell - C - Haskell.
Benefits of using the ffi are that your code will be portable to other
compilers (Hugs and NHC) and you'll be in well charted waters where
you can be confident that if things don't work then you've found a bug
and not an undocumented feature.
--
Alastair Reid
(For those who are interested in the background of my question: I
wondered if it would be possible to translate Core [Haskell] to Perl.
If I hunt around a bit, I can maybe find my notes on translating to
Forth - my goal was to be able to run Haskell on all the printers at
work.
--
Alastair
prefer to see everyone switch over to the new way so
that we can drop old features.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
[Note: I'm consistently using 'foreign thread' instead of 'native
thread'. The Haskell-spec necessarily treats Haskell as the centre of
the universe. So what a Linux kernel hacker might think of as a
'native thread' is really quite foreign to Haskell. Feel free to
ignore this little experiment
Simon Marlow:
Another problem, from an implementation point of view, is that we
would have to surround unsafe foreign calls with a lot of
context-switching gumph, in case the calling Haskell thread is bound
to a native thread. I really think we don't want to do this.
Note that you only
Are you sure you intend to change the type of forkIO? Currently it's
forkIO :: IO () - IO ThreadId
Sorry, no, I did not.
--
Alastair
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
Simon Marlow:
[Lazy I/O] is nice, but it introduces too many problems. What
happens to any I/O errors encountered by the lazy I/O? They have to
be discarded, which means you can't effectively use lazy I/O for
robust applications anyway.
Surely they are thrown as exceptions which can then
memory.
--
Alastair Reid
ps It's best to avoid relying on compilers not to context switch at
particular times unless it is documented that this is a property you
can rely on. That kind of reasoning tends to break down when your
compiler gets smarter or you switch compilers
multiple copies of what is, essentially, the same
information.
Obviously, the 3rd reason is the one of most relevance to this thread.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair
Could you be more concrete? What extension of the package mechanism
did you have in mind? (personally I had in mind a standard autoconf
+ Makefiles story for the build system, but I'm sure there are
better ways).
I was thinking add all the things that make packages insufficient
to use as
)
that brought us constructor classes, functional dependencies, etc.
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Hello, is there something like extensible records in ghc?
Are you wanting something like Hugs' T-Rex or did you have something
else in mind?
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair
Ross Paterson [EMAIL PROTECTED] cryptically writes:
Shouldn't IOError be identified with IOException rather than Exception?
I had to grovel through the code to understand what this question
means. It seems that GHC.IOBase contains these definitions:
type IOError = Exception
data
to use them when linking.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo
Koen Claessen [EMAIL PROTECTED] writes:
However, I for example have no idea what happens when unsafely
executing something that throws exceptions, performs a forkIO,
something that uses MVar's, etc.
I won't dare to try to characterize the difference exactly but you
should expect very
is that, as far as I know, GHC is
the only compiler to support the deprecated pragma so it is the only
one where it makes sense to complain that a function was removed
without being deprecated first.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid
a given expiry date.
Probably off by default.
5) Each release would include a list of any entities removed ahead of
schedule.
[It's open to debate whether this would do anything other than
increase the motivation to keep the list small.]
--
Alastair Reid [EMAIL PROTECTED
[This question might be more appropriate for the ffi mailing list]
I wonder if I might indulge myself with
another stupid question related to this, that is, why make the
distinction between Ptr and ForeignPtr at all? [...]
The reason for using ForeignPtr is to attach free functions.
If we
to go through.]
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell
you don't even see side effects
reflected as changes in the returned world state.)
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
___
Glasgow-haskell-users mailing
paper or some such.
--
Alastair Reid [EMAIL PROTECTED]
Reid Consulting (UK) Limited http://www.reid-consulting-uk.ltd.uk/alastair/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow
(NIL);
}
;
The C function 'chase' returns True if there are dependencies on
modules we haven't loaded yet. The body of the if causes Hugs to
record the offending import list and abandon compiling the current
module.
--
Alastair Reid[EMAIL
of GHC you use to build GHC with.]
PS. I still have to figure out how to make hslibs/win32 in isolation,
This seems like a common need for which there should be a standard
plan of attack. Sadly, I don't know it.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid
the latter.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
against this
is for the copyright owners to make a legally binding promise not to
do so (as the FSF have done).
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
I thought we established that generating valid C prototypes from the
Haskell FFI type signature wasn't possible due to the incompleteness
of the Haskell type (lack of 'const' modifiers for one thing - is
there anything else?).
Compilers use the same calling sequence whether you tell them
Yes - but read the text I quoted before my message. I'm not talking
about calling the function, I'm talking about generating C
prototypes. You suggested that the Haskell compiler could generate
prototypes and the C compiler could be used to check for mismatches,
which would be great if it
Anyone have any ideas that don't have such a big impact?
What we did in Hugs (for GreenCard stuff) was create a header file
containing _only_ the things needed by ffi'd code (example attached).
Since it was such a short file, it wasn't too hard to avoid
nameclashes.
This works because the
just as a note, the new version of DrIFT (which i now maintain) has
the ability to derive 'Typeable',
Very cool. (Though I'd still like to see Typeable being moved into
compilers.)
I sort of fudged the Typeable derivation rule, if someone wanted to
robustify it, i would gladly accept
instances themselves.]
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
of Aho, Sethi and Ullmann) designing a
language (C) which is not context free (because of the typedef
problem).)
--
Alastair Reid
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
think) - so you could see just where everything comes from.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow
; then become hash tables (or
something like that - it was a long time ago that I saw this).
Which is all to say that you should hide your choice of data structure
behind a common API and change it as you run into performance
problems.
--
Alastair Reid[EMAIL PROTECTED]http
) so I
think you should distill the essence of the problem into a couple of
5-10 line modules and send in a bug report (or realize what you were
doing wrong in the process).
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid
the typename stays the same but the type itself
changes, but it'll also catch a lot of errors in a lot of code.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http
compatible in this regard.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
| Int Int
| Integer Integer
| Float Float
| Double Double
| CharChar
| MiscString -- any other value that we don't yet distinguish (ie
Blackhole)
Any chance we can work together to eliminate as many of these
differences as possible?
--
Alastair Reid
roots and turn
on ambiguous filename checks and would perhaps convert their code to
use hierarchial namespaces.
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid/
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http
: confuses Bar.IO for IO
hugs -P..: Bar.Foo
# unexpected failure: confuses Bar.IO for IO
Did I do the wrong thing or do we need to tweak the loader?
(I didn't test with import chasing turned off - could that be it?)
--
Alastair Reid[EMAIL PROTECTED]http://www.cs.utah.edu/~reid
simonpj writes:
Alastair Reid is, I believe, actively working on updating his graphics
library (from which SOEGraphics was originally derived), to work with
the current version of GHC.
What I don't know is when he expects to be done.
Alastair? What's the status?
I don't think there's
71 matches
Mail list logo