There seems to be a bug in the latest version of GHC involving
renaming/typechecking external Core files (well, besides the last 3 bugs
I posted about...):
$ ghc -fext-core -fno-code Hello.hs
/home/deforest/ghc6.1src/fptools/ghc/compiler/ghc-inplace -fext-core -fno-code Hello.hs
$ ghc Hello.hcr
oops. Fixed, thank you.
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
| Behalf Of Kirsten Chevalier
| Sent: 09 July 2003 07:32
| To: [EMAIL PROTECTED]
| Subject: loop reading in external Core
|
| There seems to be a bug in the latest version of GHC
Ah, yes. Fixed.
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
| Behalf Of Kirsten Chevalier
| Sent: 09 July 2003 00:25
| To: [EMAIL PROTECTED]
| Subject: External Core front end is completely broken
|
| Using the latest version of GHC downloaded from CVS,
Bugs item #768658, was opened at 2003-07-09 11:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=108032aid=768658group_id=8032
Category: Compiler
Group: 6.0
Status: Open
Resolution: None
On Wed, Jul 09, 2003 at 12:08:50PM +0100, Simon Peyton-Jones wrote:
Ah, yes. Fixed.
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
| Behalf Of Kirsten Chevalier
| Sent: 09 July 2003 00:25
| To: [EMAIL PROTECTED]
| Subject: External Core front end is
Hal,
I was really hoping that someone would have a pretty answer for you by
now. Just this last week, I came up with a similar problem--I need to
pass a handle to some foreign code, but in my case, the foreign code
can treat the handle as opaque, it just needs to be able to give it
back to
In my program, I get the following time/allocation information for a
call to my cosine function:
individual inherited
COST CENTRE no. entries %time %alloc %time %alloc
cosine 2721 43.1 74.343.1 74.3
this is a shocking amount of
Hal Daume wrote:
I have a C function that, for simplicity, has its definition as
something like:
void myCFun(FILE *fd);
I have a Handle I've opened in Haskell using openFileEx and would like
to pass this to the function.
GHC's Handle type is based upon a descriptor rather than a
On Wednesday, 2003-07-09, 05:31, Glynn Clements wrote:
[...]
There isn't a standard mechanism for binary I/O.
NHC98 contains the York Binary library. Can someone tell me if this is
available for other Haskell systems? And didn't GHC also provide binary I/O?
However, a simple and fairly
There isn't a standard mechanism for binary I/O.
NHC98 contains the York Binary library. Can someone tell me if this is
available for other Haskell systems? And didn't GHC also provide binary I/O?
How does the GHC itself read/write binary data, since the interface
files (*.hi) produced by GHC
And didn't GHC also provide binary I/O?
http://www.haskell.org/ghc/docs/latest/html/base/Data.Array.IO.html#4
--
-- Johannes Waldmann http://www.informatik.uni-leipzig.de/~joe/ --
-- [EMAIL PROTECTED] -- phone/fax (+49) 341 9732 204/209 --
___
A library for reading and writing binary data, portable across both
implementations and platforms, has been a long-standing lack. It comes
up regularly, and has been discussed recently on the libraries list
([EMAIL PROTECTED]). Most recently George Russell posted a library,
but I don't know it's
Wolfgang Jeltsch wrote:
However, a simple and fairly generic mechanism for doing this is:
1. Read in a list of Chars with the standard I/O functions.
This will most likely cause problems under Windows. The reason is that the
standard I/O functions are intended for reading and writing
I've learned haskell months, but I still can't understand the type system very well.
I can only write:
---
type Vector = [Double]
vadd,vsub :: Vector-Vector-Vector
v1 `vadd` v2 = zipWith (+) v1 v2
v1 `vsub` v2 = zipWith (-) v1 v2
svmul :: Double-Vector-Vector
s
GHC uses its own version of the NHC library. It's linked off of the
libraries page:
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs
/Binary.html
Moreover, I have my own version of this library which we were, for a
while, trying to synch with the NHC library so it could
What you want to do is make your Vector an instance of the Num(eric)
type class. For instance:
instance Num Vector where
(+) v1 v2 = zipWith (+) v1 v2
(-) v1 v2 = zipWith (-) v1 v2
negate v1 = map negate v1
abs v1 = map abs v1
(*) v1 v2 = ...
fromInteger i = ...
signum v1 = ...
Hal Daume answers a question on how to define nice, infix ops
acting on vectors:
What you want to do is make your Vector an instance of the Num(eric)
type class. For instance:
instance Num Vector where
(+) v1 v2 = zipWith (+) v1 v2
(-) v1 v2 = zipWith (-) v1 v2
negate v1 = map negate v1
On Wednesday, 2003-07-09, 15:16, CEST, Glynn Clements wrote:
[...]
Both GHC and Hugs provide openFileEx, which allows files to be read in
binary mode (without EOL/EOF translations).
So we have portable binary I/O, don't we?
By the way, does one still read characters rather than bytes even if
Quite right :). I agree whole-heartedly. There's nothing wrong with
overloading (+) and (-) in this case, but the rest really don't make
much sense. Probably best to leave them undefined and just not use
them. Then you could define your own dot product function and the like.
--
Hal Daume
On Wednesday, 2003-07-09, 17:11, CEST, Hal Daume wrote:
What you want to do is make your Vector an instance of the Num(eric) type
class.
It would be better to define one's own operators instead of using + and -
because Vector has no meaningful instance of Num (as Jerzy Karczmarczuk
already
G'day all.
On Wed, Jul 09, 2003 at 05:25:20PM +0200, Jerzy Karczmarczuk wrote:
While this is a possible solution, I would shout loudly: Arrest this man,
he is disrespectful wrt math!. Actually, this shows once more that the Num
class and its relatives is a horror...
Yup.
I recently
Hal Daume wrote:
What you want to do is make your Vector an instance of the Num(eric)
type class. For instance:
instance Num Vector where
Except that class instances have to be algebraic datatypes (data) or
renamed datatypes (newtype), but not type synonyms (type).
--
Glynn Clements
Wolfgang Jeltsch wrote:
Both GHC and Hugs provide openFileEx, which allows files to be read in
binary mode (without EOL/EOF translations).
So we have portable binary I/O, don't we?
By the way, does one still read characters rather than bytes even if using
openFileEx?
openFileEx
I've learned haskell months, but I still can't understand the type system very well.
I can only write:
---
type Vector = [Double]
vadd,vsub :: Vector-Vector-Vector
v1 `vadd` v2 = zipWith (+) v1 v2
v1 `vsub` v2 = zipWith (-) v1 v2
svmul :: Double-Vector-Vector
s
[Please accept our apologies if you receive multiple copies of this CFP]
---
1st CALL FOR PAPERS
Special Issue on
SEMANTICS AND COST MODELS
FOR HIGH-LEVEL PARALLEL PROGRAMMING
to appear
[Please accept our apologies if you receive multiple copies of this CFP]
---
1st CALL FOR PAPERS
Special Issue on
SEMANTICS AND COST MODELS
FOR HIGH-LEVEL PARALLEL PROGRAMMING
to appear
26 matches
Mail list logo