Re[2]: Bug with Char.isAlpha

2006-05-31 Thread Bulat Ziganshin
Hello Simon,

Wednesday, May 31, 2006, 5:57:26 PM, you wrote:

> This looks like some kind of input problem: I get the same results as
> you when using a Windows command shell, but not when using an xterm or
Prelude>> '§'
> '\245'

> but '\245' is not the § character, it is the õ character.  So the 
> command shell has done some translation before GHCi even saw the character.

windows? :) it's the wisest system in the world about Char encodings.
once i counted that my console program use 5 (FIVE!) different
encodings. in particular, ANSI codepage for cmdline and filenames,
OEM codepage for console I/O. you should use "SetConsoleCodepage"
system call (afaik, this way you can even set UTF-8 encoding) to
switch console to using ANSI CP or you can translate your input&output
between OEM codepage and what you actually need

-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #781: GHCi on x86_64, cannot link to static data in shared libs

2006-05-31 Thread GHC
#781: GHCi on x86_64, cannot link to static data in shared libs
---+
Reporter:  guest   |Owner: 
Type:  bug |   Status:  new
Priority:  normal  |Milestone: 
   Component:  Compiler|  Version:  6.5
Severity:  normal  |   Resolution: 
Keywords:  getEnvironment  |   Difficulty:  Unknown
Architecture:  x86_64 (amd64)  |   Os:  Linux  
---+
Changes (by simonmar):

  * architecture:  Unknown => x86_64 (amd64)
  * summary:  getEnvironment segfaults (6.5.20060527 - snapshot) => GHCi on
  x86_64, cannot link to static data in shared
  libs
  * os:  Unknown => Linux

Comment:

 I've fixed part of the problem (getEnvironment was broken), but this still
 won't work with GHCi on x86_64 due to another problem: for annoying
 reasons the dynamic linker doesn't support linking to static data in
 shared libraries, which the 'environ' variable in C is.  So I'm leaving
 the bug open with a revised heading.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #738: ghc can't load files with selinux Enforcing

2006-05-31 Thread GHC
#738: ghc can't load files with selinux Enforcing
---+
Reporter:  [EMAIL PROTECTED]  |Owner: 
Type:  bug |   Status:  closed 
Priority:  normal  |Milestone:  6.4.3  
   Component:  Runtime System  |  Version:  6.4.1  
Severity:  major   |   Resolution:  fixed  
Keywords:  |   Difficulty:  Unknown
Architecture:  x86_64 (amd64)  |   Os:  Linux  
---+
Changes (by simonmar):

  * resolution:  => fixed
  * status:  new => closed

Comment:

 Fixed in the HEAD and the 6.4 branch, but I haven't been able to test
 (don't have SE Linux on a local machine).  Please download a snapshot and
 try it out, if possible.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: compiling from source - error

2006-05-31 Thread Simon Marlow
If this error is not repeatable, then it is likely a hardware glitch. 
If it is repeatable, can you give us more information:


 - what platform is this?
 - where did you get your 6.4.1 distribution?

Cheers,
Simon

Johan Meskens CS3 jmcs3 wrote:

==fptools== make all - --no-print-directory -r;
 in /home/jmcs3/Desktop/ghc-6.4.2.20060524/ghc/utils/hsc2hs

/usr/bin/ghc -H16m -O -i../../lib/compat -ignore-package Cabal -Rghc-timing 
-Wal l-c Main.hs -o Main.o  -ohi Main.hi

Main.hs:887:0: Warning: Defined but not used: `unDosifyPath'
ghc-6.4.1: internal error: scavenge: unimplemented/strange closure type 30091 @ 
0x4229afa0
Please report this as a bug to glasgow-haskell-bugs@haskell.org,
or http://www.sourceforge.net/projects/ghc/
make[3]: *** [Main.o] Error 254
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/jmcs3/Desktop/ghc-6.4.2.20060524/ghc'
make: *** [build] Error 1


___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: Bug with Char.isAlpha

2006-05-31 Thread Simon Marlow

Michael Nagel wrote:


I am using the precompiled windows version of ghc-6.4.2 and for some reason

Prelude> Char.isAlpha '§'

returns true. Hugs however, is of the opinion that the paragraph sign is 
not an alphabetic character and so am I. I did not find any rationale 
for this behavior (as  no system I know of treats the §-sign as an 
alphabetic char) so I think it is a bug and should be fixed.


Regards,
Michael

PS: I have not been using ghc(i) for too long, so if I missed something, 
please let me know.


This looks like some kind of input problem: I get the same results as 
you when using a Windows command shell, but not when using an xterm or 
on Unix.


The problem is better illustrated like this:

Prelude> '§'
'\245'

but '\245' is not the § character, it is the õ character.  So the 
command shell has done some translation before GHCi even saw the character.


On Un*x, or in an xterm on Windows, I get

Prelude> '§'
'\167'

I claim this is not our bug.  If anyone knows a workaround or can 
explain why this happens, please let us know.


Cheers,
Simon
___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: Strange behaviour with classes (both Hugs and GHC)

2006-05-31 Thread Sigbjorn Finne

Hi,

if you desugar the definition that's causing the type error,
perhaps it becomes a little bit clearer what's going on, i.e.,
from

problematic :: MyAnnotatedType Int
problematic = defaultVal{theInt=42,theAnnotation=10}

you expand this to

problematic' = case defaultVal of { MAT a b c -> MAT 42 b 10 }

Clearly, the type of 'c' is ambiguous here. Interestingly, if Haskell 98
had defined record update expr "e{fields}" as having the same type
as "e", this wouldn't have been an issue:

no_probs =
case defaultVal of { m@(MAT a b c) -> (MAT 42 b 10) `asTypeOf` m}

hth
--sigbjorn

- Original Message - 
From: "Magnus Björk" <[EMAIL PROTECTED]>

To: ; 
Sent: Monday, May 29, 2006 03:34
Subject: Strange behaviour with classes (both Hugs and GHC)



I just ran into a strange behaviour of both Hugs and GHC. I discussed it
with John Hughes who managed to find a workaround, and suggested that I
ask you whether this is really expected behaviour.

The attached file contains a small example that exhibits the problem.

--
/MpB







___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Strange behaviour with classes (both Hugs and GHC)

2006-05-31 Thread Magnus Björk
I just ran into a strange behaviour of both Hugs and GHC. I discussed it 
with John Hughes who managed to find a workaround, and suggested that I 
ask you whether this is really expected behaviour.


The attached file contains a small example that exhibits the problem.

--
/MpB-
-- Class Default - used to define default values for types

class Default a where
  defaultVal :: a

instance Default () where
  defaultVal = ()

instance Default Bool where
  defaultVal = False

instance Default Int where
  defaultVal = 0

-
-- Data type with annotations

data MyAnnotatedType a = MAT { theInt :: Int
 , theBool :: Bool
 , theAnnotation :: a 
 }

-- If the annotation type a is an instance of default, the we can define
-- default values for MyAnnotatedType a:

instance Default a => Default (MyAnnotatedType a) where
  defaultVal = MAT defaultVal defaultVal defaultVal

-
-- Defining values of MyAnnotatedType (this is where we run into problems)

noProblem :: MyAnnotatedType ()
noProblem = defaultVal { theInt = 42 }

noProblem2 :: MyAnnotatedType Int
noProblem2 = defaultVal { theInt = 42 }

problematic :: MyAnnotatedType Int
problematic = defaultVal { theInt = 42
 , theAnnotation = 10 
 }

-- The line ", theAnnotation = 10" is the problematic one. It seems impossible
-- to fix the problem by rewriting this line (I've tried things such as 
-- defaultVal, error "", or adding the type explicitly). 

-
-- A workaround (thanks to John Hughes)

-- define an unoverloaded version of defaultVal
defaultMAT = defaultVal :: MyAnnotatedType Int

workaround :: MyAnnotatedType Int
workaround = defaultMAT { theInt = 42
, theAnnotation = 10
}



___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Bug with Char.isAlpha

2006-05-31 Thread Michael Nagel

Hi!

I am using the precompiled windows version of ghc-6.4.2 and for some reason

Prelude> Char.isAlpha '§'

returns true. Hugs however, is of the opinion that the paragraph sign is 
not an alphabetic character and so am I. I did not find any rationale 
for this behavior (as  no system I know of treats the §-sign as an 
alphabetic char) so I think it is a bug and should be fixed.


Regards,
Michael

PS: I have not been using ghc(i) for too long, so if I missed something, 
please let me know.

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


compiling from source - error

2006-05-31 Thread Johan Meskens CS3 jmcs3

==fptools== make all - --no-print-directory -r;
 in /home/jmcs3/Desktop/ghc-6.4.2.20060524/ghc/utils/hsc2hs

/usr/bin/ghc -H16m -O -i../../lib/compat -ignore-package Cabal -Rghc-timing 
-Wal l-c Main.hs -o Main.o  -ohi Main.hi

Main.hs:887:0: Warning: Defined but not used: `unDosifyPath'
ghc-6.4.1: internal error: scavenge: unimplemented/strange closure type 30091 @ 
0x4229afa0
Please report this as a bug to glasgow-haskell-bugs@haskell.org,
or http://www.sourceforge.net/projects/ghc/
make[3]: *** [Main.o] Error 254
make[2]: *** [all] Error 1
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/jmcs3/Desktop/ghc-6.4.2.20060524/ghc'
make: *** [build] Error 1







the following could be unreadable @ 1148570105   ::: 
***
 , =
 , 3133706f736974696f6e2053
 , >
 , this
 , |
 , 2
 , |
 , spot.place.ort
 , |-|
 , 616622
 , ?
 , 




___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #781: getEnvironment segfaults (6.5.20060527 - snapshot)

2006-05-31 Thread GHC
#781: getEnvironment segfaults (6.5.20060527 - snapshot)
---+
Reporter:  guest   |Owner: 
Type:  bug |   Status:  new
Priority:  normal  |Milestone: 
   Component:  Compiler|  Version:  6.5
Severity:  normal  |   Resolution: 
Keywords:  getEnvironment  |   Difficulty:  Unknown
Architecture:  Unknown |   Os:  Unknown
---+
-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #781: getEnvironment segfaults (6.5.20060527 - snapshot)

2006-05-31 Thread GHC
#781: getEnvironment segfaults (6.5.20060527 - snapshot)
---+
  Reporter:  guest |  Owner:
  Type:  bug   | Status:  new   
  Priority:  normal|  Milestone:
 Component:  Compiler  |Version:  6.5   
  Severity:  normal|   Keywords:  getEnvironment
Difficulty:  Unknown   |   Architecture:  Unknown   
Os:  Unknown   |  
---+
System.Posix.getEnvironment fails on Linux 2.6.16-1.2108_FC4smp
 with a segfault. (x86_64)

 {{{
 [EMAIL PROTECTED] HopenCV]$ ghci
___ ___ _
   / _ \ /\  /\/ __(_)
  / /_\// /_/ / /  | |  GHC Interactive, version 6.5.20060527, for
 Haskell 98.
 / /_\\/ __  / /___| |  http://www.haskell.org/ghc/
 \/\/ /_/\/|_|  Type :? for help.

 Loading package base-1.0 ... linking ... done.
 Prelude> :m +System.Posix.Env
 Prelude System.Posix.Env> getEnv "USER"
 Loading package unix-1.0 ... linking ... done.
 Just "aleator"
 Prelude System.Posix.Env> getEnvironment
 Segmentation fault
 }}}

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs