Re: [Haskell-cafe] The values of infinite lists

2006-05-09 Thread Antti-Juhani Kaijanaho

Deokhwan Kim wrote:

Are the values of infinite lists _|_ (bottom)?


Depends on what you mean by "value".

If you define "value" to mean "normal form", then yes.

If you define "value" to mean "weak head normal form", then no.

The former is common in strict programming languages. In nonstrict 
functional programming, the latter is more useful.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] The values of infinite lists

2006-05-09 Thread Deokhwan Kim

Are the values of infinite lists _|_ (bottom)?

In section 1.3, the Haskell 98 report said as follows:

  Errors in Haskell are semantically equivalent to _|_. Technically,
  they are not distinguishable from nontermination, so the language
  includes no mechanism for detecting or acting upon errors.

Therefore, the value of the following infinity is _|_. Right?

  data Nat = Zero | Succ Nat

  infinity = Succ infinity

What about infinite lists? For example, is the value of [1 ..] also _|_?

Thanks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] develop new Haskell shell?

2006-05-09 Thread Graham Klyne
Did you see [http://nellardo.com/lang/haskell/hash/] ?

Google also finds some links to code.

#g
--

Marc Weber wrote:
> Hi.
> 
> Who wants to try devloping a new shell with me?
> 
> The main goals: try adding some haskell scriting instead of bash/zsh,
> 
> history dependend on 
> a) executing program
> b) current dir
> c) last commands
> d) workspaces
> which should mean that the shell should save at least the last 10
> commands of a,b,c,d.
> 
> So you can do
> emerge (lookup parameters in history) even if you haven't used emerge
> for ages.. :) Nice, isn't it?
> 
> d) Workspaces should mean:
> You can define some kind of workspace like
> workspace=haskellproject, wash, apache 
> to add these tags together with the commands to the history..
> So when working only in the "wash" workspace you can easily find those
> commands.. Perhpas it's even useful to attach commands or even scripts
> to those workspaces?
> 
> eg the startApache script may be attached to
> admin, apache, ...,
> the cd /etc/init.d command only to admin..
> 
> I also would like to have some advanced kind of directory matching,
> defining aliases for directories.
> 
> eg just type
> cd /usl to get a  list of diretories looking like this:
> /UserShupportLocales
> /usr/src/linux
> /usl ?
> 
> Using tab and bash is nice but it might be done better?
> 
> Any suggestions?
> 
> One would have to think about how to run processes in background and so
> on ...
> 
> adding files as parameters the way it's possible in mc ( select them and
> add them to the command line )
> 
> perhaps even implement cp/mv/ ... for virtual file systems like zip
> files/ ftp/ ... ?
> 
> and last but not least:
> on windows add all Programs beeing found in Start-> Programs to the path
> list... I wish I could just do word/ Enterprise Manager at a shell and
> not searching for the menu entries over and over again.. ;)
> I know I can add them the to the path.. but that would be some work,
> too.. and not desirable in any case.
> 
> I could imagine adding a small prefix to each cmd eg.
> 
> eb (execute bash cmd)
> ez (execute zsh cmd)
> r (remove file list)
> efs (execute from windows start menu)
> bg  run in background like bashs & feature.
> 
> Perhaps even introduce some new syntax ?
> or use ghci or hugs with a preprocessor to translate these commands to
> haskell commands?
> 
> What do you think?
> 
> Marc Weber
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 

-- 
Graham Klyne
For email:
http://www.ninebynine.org/#Contact

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] develop new Haskell shell?

2006-05-09 Thread Marc Weber
Hi.

Who wants to try devloping a new shell with me?

The main goals: try adding some haskell scriting instead of bash/zsh,

history dependend on 
a) executing program
b) current dir
c) last commands
d) workspaces
which should mean that the shell should save at least the last 10
commands of a,b,c,d.

So you can do
emerge (lookup parameters in history) even if you haven't used emerge
for ages.. :) Nice, isn't it?

d) Workspaces should mean:
You can define some kind of workspace like
workspace=haskellproject, wash, apache 
to add these tags together with the commands to the history..
So when working only in the "wash" workspace you can easily find those
commands.. Perhpas it's even useful to attach commands or even scripts
to those workspaces?

eg the startApache script may be attached to
admin, apache, ...,
the cd /etc/init.d command only to admin..

I also would like to have some advanced kind of directory matching,
defining aliases for directories.

eg just type
cd /usl to get a  list of diretories looking like this:
/UserShupportLocales
/usr/src/linux
/usl ?

Using tab and bash is nice but it might be done better?

Any suggestions?

One would have to think about how to run processes in background and so
on ...

adding files as parameters the way it's possible in mc ( select them and
add them to the command line )

perhaps even implement cp/mv/ ... for virtual file systems like zip
files/ ftp/ ... ?

and last but not least:
on windows add all Programs beeing found in Start-> Programs to the path
list... I wish I could just do word/ Enterprise Manager at a shell and
not searching for the menu entries over and over again.. ;)
I know I can add them the to the path.. but that would be some work,
too.. and not desirable in any case.

I could imagine adding a small prefix to each cmd eg.

eb (execute bash cmd)
ez (execute zsh cmd)
r (remove file list)
efs (execute from windows start menu)
bg  run in background like bashs & feature.

Perhaps even introduce some new syntax ?
or use ghci or hugs with a preprocessor to translate these commands to
haskell commands?

What do you think?

Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: GHC 6.4.1 x86-64 does not compile

2006-05-09 Thread Dusan Kolar

Well, thanks for kicking. :-)

Now, I have a 6.4.1 version compiling for 64bits. Nevertheless, if I try 
to build a 6.4.2 based on this ghc and 64bit gcc, I get this error 
during make (quite soon after make starts) - below my text.


Is there again a problem in mixing of 32/64-bit versions or is there a 
principial problem?


Any further kick is velcome :-)

Thx and regards
Dusan

P.S.
Curently produced executable by ghhc 6.4.1 has the following signature:
a.out: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for 
GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped

D.

--


/mnt/data/FLP/bin/ghc -H16m -O -cpp -Wall -fno-warn-name-shadowing 
-fno-warn-unused-matches -i../../lib/compat -ignore-package Cabal 
-Rghc-timing-c Version.hs -o Version.o  -ohi Version.hi


Version.hs:2:0: Warning: Definition but no type signature for `version'

Version.hs:3:0: Warning: Definition but no type signature for `targetOS'

Version.hs:4:0: Warning: Definition but no type signature for `targetARCH'
In file included from /tmp/ghc24730.hc:4:
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:42:21: termios.h: not a 
file or directory
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:81:23: sys/timeb.h: not a 
file or directory

In file included from /tmp/ghc24730.hc:4:
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: error: syntax error 
before "__hscore_lflag"
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: "struct 
termios" declared inside parameter list
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: its scope is 
only this definition or declaration, which is probably not what you want
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: return type 
defaults to `int'

/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function `__hscore_lflag':
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: error: dereferencing 
pointer to incomplete type

/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: At top level:
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: syntax error 
before "tcflag_t"
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function 
`__hscore_poke_lflag':
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: `ts' undeclared 
(first use in this function)
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: (Each 
undeclared identifier is reported only once
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: for each 
function it appears in.)
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: `t' undeclared 
(first use in this function)

/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: At top level:
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:544: warning: "struct 
termios" declared inside parameter list
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function 
`__hscore_ptr_c_cc':
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:545: error: dereferencing 
pointer to incomplete type
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function 
`__hscore_sizeof_termios':
/mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:551: error: invalid 
application of `sizeof' to incomplete type `termios'
<(3 samples), 20M in use, 0.00 INIT (0.00 elapsed), 0.18 MUT (0.45 
elapsed), 0.18 GC (0.17 elapsed) :ghc>>

make[4]: *** [Version.o] Error 1
make[3]: *** [boot] Error 2
make[2]: *** [boot] Error 1
make[1]: *** [boot] Error 1
make[1]: Leaving directory `/mnt/data/FLP/Downloads/ghc-6.4.2/ghc'
make: *** [build] Error 1


Simon Marlow wrote:


Dusan Kolar wrote:


Hello all,

 I've install "universal binary" for x86_64 of GHC 6.4.1. The 
installation was done on AMD dual core machine. Uname for the machine 
gives:


Linux  2.6.16.5 #1 SMP Thu Apr 13 09:08:22 CEST 2006 
x86_64 x86_64 x86_64 GNU/Linux


While ghci was running some tests well, the ghc ended compilation 
with a long list of errors starting like this:


Chasing modules from: queen-main
Compiling QueensDK ( ./QueensDK.hs, ./QueensDK.o )
/tmp/ghc27286.s: Assembler messages:
/tmp/ghc27286.s:26: Error: bad register name `%r12'
/tmp/ghc27286.s:27: Error: bad register name `%r15'
/tmp/ghc27286.s:29: Error: bad register name `%r12)'
/tmp/ghc27286.s:30: Error: bad register name `%r12)'
/tmp/ghc27286.s:31: Error: bad register name `%r12)'
/tmp/ghc27286.s:32: Error: bad register name `%rax'
/tmp/ghc27286.s:33: Error: bad register name `%r13)'
/tmp/ghc27286.s:34: Error: bad register name `%rbp'
/tmp/ghc27286.s:37: Error: bad register name `%rbx)'
/tmp/ghc27286.s:38: Error: bad register name `%rbx)'
/tmp/ghc27286.s:45: Error: bad register name `%rbp)'
/tmp/ghc27286.s:46: Error: bad register name `%r14'
/tmp/ghc27286.s:48: Error: bad register name `%rbp)'
/tmp/ghc27286.s:49: Error: bad register name `%r13'


The list is quite long. I've truncated it.

Well, OK, the x386 version is running, but it won't compile GHC-6.4.2 
and, moreover, it's not optimized for the HW. ;-)


Is there any way out, or what may I be doing wrong way?



It appears that somehow the assembler is being used in 32-bit mode, 
rather than 6