Re: Q: Efficiency of Array Implementation

1999-02-19 Thread Jan Laitenberger


Dear Mr. Mechveliani,
 

 I thought efficient arrays are impossible in functional language.

I'm not sharing this thought...   

Here is a quote from the Haskell Library Report:

\begin{quote}
  ``Haskell provides indexable arrays, which may be thought of as functions
whose domains are isomorphic to contiguous subsets of the integers.
Functions restricted in this way can be implemented efficiently;
in particular, a programmer may reasonably expect rapid access to the
components.''
\end{quote}
   
 So we have to organise the data so that to avoid the access by index
  - as possible. 

Sure. If possible - ok.


Regards,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger 
--(-|--
   \|



Q: Efficiency of Array Implementation

1999-02-18 Thread Jan Laitenberger


Hi,


I recently noticed in a test program, that updating a table of
fixed size (index and entries of type Int) was slower using an
Array instead of our AVL implementation.

Does anybody know which compiler option I must give on the
command line that the Array is translated to a C array?

I was using ghc-4.01 without special options.


Many thanks in advance,   

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger 
--(-|--
   \|




getChar without pressing return?

1999-01-30 Thread Jan Laitenberger


Hi,


Does anyone know how I can get a character without the
need of pressing the return key afterwards?

main = do c - getChar 
  putStr (c:"")

Hugs returns the control back to the program as soon as
a character was read - but ghc waits for a whole line
to be finished...


Thanks,  

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger 
--(-|--
   \|



ghc-4.00 cvs source build question

1998-11-12 Thread Jan Laitenberger


Hello,


This morning I got the cvs source tree from

  CVSROOT="[EMAIL PROTECTED]:/cvs"

The build created the files

  lrwxrwxrwx   1 laitenbe pardc  8 Nov 12 07:09 ghc - ghc-3.03*
  -rwxr-xr-x   1 laitenbe pardc 103189 Nov 12 07:09 ghc-3.03*
  -rwxr-xr-x   1 laitenbe pardc  36772 Nov 12 07:09 hp2ps*
  -rwxr-xr-x   1 laitenbe pardc   2946 Nov 12 07:09 hstags*
  -rwxr-xr-x   1 laitenbe pardc  19993 Nov 12 07:09 mkdependHS*
  -rwxr-xr-x   1 laitenbe pardc   2558 Nov 12 07:09 stat2resid*

in the bin directory.

Did you put Version 3.03 back in the repository? Or is it just
the wrong name?


Best Wishes,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|



GHC 4.00 symbol ... is multiply defined

1998-11-11 Thread Jan Laitenberger


Hi!


The final ghc call to combine the object files of our project

  /public/languages/ghc-4.00/bin/ghc -o P -H30M  Avl.o Codegen.o 

produces 

ld: fatal: symbol `DoubleNaN' is multiply defined:
  (file /public/languages/ghc-4.00/lib/ghc-4.00/libHS_cbits.a(floatExtreme.o) 
  and file /public/languages/ghc-4.00/lib/ghc-4.00/libHSrts.a(StgPrimFloat.o));

messages. (also for symbols isFloatInfinite, isFloatDenormalized,
isFloatNegativeZero, isDoubleInfinite, isDoubleDenormalized,
isDoubleNegativeZero, isFloatNaN)

What can I do to avoid this?


Many thanks in advance,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|



Re: `Funny global thing' in ghc-4

1998-11-09 Thread Jan Laitenberger



Your question was already on the mailing list before:

Simon Marlow wrote:
 This means you've got a pretty complex bit of code that needed a
 bitmap with more than 32 entries to describe a stack frame.

 Cool :-)

  I wrote:
   can the "Funny global thing?" message be ignored? 
  (It does not crash the compiler.)

Simon Marlow wrote:
 Yep, the warning can be ignored.


Best wishes,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|



RE: topdelcs / decls

1998-10-23 Thread Jan Laitenberger


Dr. Johannes Waldmann wrote:
 well, as i said, it's just a thought.

Your thought would destroy equational reasoning! For example you
would be able to define different equalties on the same data
structure. So Red==Black could be False in one place and True 
in another place. Does that make any sense? 


Best Wishes,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|





GHC-4.00 assembler crash

1998-10-20 Thread Jan Laitenberger


Hi,


Compiling our interpreter module causes the assembler to crash

  ghc -c -H45M Inter.hs

returns:

  /usr/ccs/bin/as: "/tmp/ghc22153.s", line 572: error: statement syntax
  /usr/ccs/bin/as: "/tmp/ghc22153.s", line 572: error: statement syntax
  /usr/ccs/bin/as: "/tmp/ghc22153.s", line 590: error: statement syntax
  /usr/ccs/bin/as: "/tmp/ghc22153.s", line 590: error: statement syntax


These lines look like:  (I used -S to get the assembler file)

  .word 0rfunction


Is this a valid assembler syntax?? If I delete "rfunction"
the assembler accepts the program. But is it still correct then?


Best Wishes,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|



GHC-4.00 gmake boot problem

1998-10-17 Thread Jan Laitenberger


Hi,


gmake boot fails. Here are the last lines of the output:
(I left out some of the .hs files on the command line of ghc)



==fptools== gmake boot --no-print-directory -r;
 in /home/cl/laitenbe/tmp/fptools/ghc/compiler

ghc -M -optdep-f -optdep.depend  -optdep-o -optdepo-cpp -fglasgow-exts\
-Rghc-timing -I. -IcodeGen -InativeGen -Iparser -iutils:basicTypes:types:\
hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:\
stranal:stgSyn:simplStg:codeGen:absCSyn:main:reader:profiling:parser:\
nativeGen -recomp  parser/U_binding.hs  parser/U_constr.hs\
parser/U_either.hs  parser/U_entidt.hs  
[...]
No file `Addr.hi', `Addr.lhs', `Addr.hs' (reqd from file `utils/DirUtils.lhs')
among import directories:
.:utils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:\
coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:\
absCSyn:main:reader:profiling:parser:nativeGen
gmake[2]: *** [depend] Error 1



What can I do to solve this problem? Which Addr.* file is required? 
The one from ghc-4.00 or from ghc-2.10 (which I use for the compilation) 


I tried to add the ../lib/exts to the -i switch in ghc/compiler/Makefile.
There is Addr.lhs. - This causes "gmake all" to fail with these error
messages 


ghc -cpp ... -c ../lib/exts/GlaExts.lhs -o ../lib/exts/GlaExts.o -osuf o

../lib/exts/GlaExts.lhs:62:
Could not find valid interface file `PrelGHC'

../lib/exts/GlaExts.lhs:64:
Could not find valid interface file `PrelAddr'
[...]


I also tried to import from /public/languages/ghc-2.10/lib/ghc-2.10/imports.
Then the error messages after "gmake all" look like these:

../lib/exts/GlaExts.lhs:62:
Could not find valid interface file `PrelGHC'
 
../lib/exts/GlaExts.lhs:64:
Could not find valid interface file `PrelAddr'
 
../lib/exts/GlaExts.lhs:64:
Module PrelAddr does not export `Addr'(..)
[...]



Thanks in advance,

Jan

 ___
'---|--
|  __,   _  _  EMail: [EMAIL PROTECTED]
| /  |  / |/ | WWWeb: http://www.uni-passau.de/~laitenbe/
|/\_/|_/  |  |_/
   /| Laitenberger
--(-|--
   \|