[GHC] #1666: -Werror aborts too early

2007-09-06 Thread GHC
#1666: -Werror aborts too early
--+-
  Reporter:  simonmar |  Owner: 
  Type:  bug  | Status:  new
  Priority:  low  |  Milestone:  6.10   
 Component:  Compiler |Version:  6.6.1  
  Severity:  normal   |   Keywords: 
Difficulty:  Easy (1 hr)  | Os:  Unknown
  Testcase:   |   Architecture:  Unknown
--+-
When `-Werror` is on, we'd like to see all the warnings before the
 compilation aborts.  At the moment, if a given stage of the compiler
 generates warnings (e.g. the renamer), we stop right there and don't go on
 to do further stages, even though we could.  This isn't completely trivial
 to fix, we need to remember somewhere that warnings were generated
 earlier, or remember the warnings themselves.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1666
GHC http://www.haskell.org/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: ghci :browse! and type of class methods ([GHC] #1617)

2007-09-06 Thread Simon Peyton-Jones
| i would still like to know how one is supposed to display
| the type of class methods, and why 'it' is not bound in the
| same naive way i've used to bind 'output'. once these two

About the it/output thing, I don't know. Can you be more explicit about what 
your question is?

Concerning class methods...

| *Main :b! Control.Monad
| fail :: Monad m - forall a. String - m a

I can't explain why this does not print as (Monad m) = ...
I'll try applying your patch when I have a clean build to hand.

| also, if the class method has its own context, as in:
|
| class C a where  c :: Num b = a - b
|
| we get two levels of context, instead of a single merged context:
|
| *Main :b! Main
| class C a where c :: (Num b) = a - b
| c :: C a - forall b. (Num b) = a - b

I think the right thing here is to change Type.dropForAlls, so that it drops 
for-alls nested to the right of arrows.  Then you'd get
c :: (C a, Num b) = a - b

However, if you *ask* to display the foralls, then the only thing to do is to 
display the actual type, as you do here:

| *Main :set -fglasgow-exts
|
| *Main :b! Main
| class C a where c :: forall b. (Num b) = a - b
| c :: forall a. (C a) = forall b. (Num b) = a - b

This *really is* c's type, so it's only honest to say so.

(I'm not sure why -fglasgow-exts switches on forall-printing; that seems odd.  
Is it really what GHC does?  We should surely have a flag for that.)

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


Re: [GHC] #919: Cryptic type error message (should be syntax error)

2007-09-06 Thread GHC
#919: Cryptic type error message (should be syntax error)
-+--
Reporter:  [EMAIL PROTECTED]  |Owner: 
Type:  bug   |   Status:  closed 
Priority:  normal|Milestone:  6.8
   Component:  Compiler (Type checker)   |  Version:  6.5
Severity:  normal|   Resolution:  fixed  
Keywords:|   Difficulty:  Easy (1 hr)
  Os:  Unknown   | Testcase: 
Architecture:  Unknown   |  
-+--
Changes (by simonmar):

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

Comment:

 Definitely fixed, error is now:

 {{{
 919.hs:1:20:
 Illegal operator `.' in type `forall a . ((a - Maybe (b, a))
   - a - c)'
   (Use -XTypeOperators to allow operators in types)
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/919
GHC http://www.haskell.org/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] #1465: Type errors due to different package versions are a bit cryptic

2007-09-06 Thread GHC
#1465: Type errors due to different package versions are a bit cryptic
+---
Reporter:  guest|Owner: 
   
Type:  bug  |   Status:  closed 
   
Priority:  normal   |Milestone:  6.8
   
   Component:  Compiler (Type checker)  |  Version:  6.6.1  
   
Severity:  normal   |   Resolution:  fixed  
   
Keywords:   |   Difficulty:  Moderate (1 day)   
   
  Os:  Unknown  | Testcase:  tcfail182, bug1465, 
mod180
Architecture:  Unknown  |  
+---
Changes (by simonmar):

  * difficulty:  Easy (1 hr) = Moderate (1 day)
  * resolution:  = fixed
  * testcase:  tcfail182 = tcfail182, bug1465, mod180
  * status:  new = closed

Comment:

 Fixed:

 {{{
 Thu Sep  6 10:37:44 BST 2007  Simon Marlow [EMAIL PROTECTED]
   * FIX #1465, error messages could sometimes say things like A.T doesn't
 match A.T
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1465
GHC http://www.haskell.org/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: ghci :browse! and type of class methods ([GHC] #1617)

2007-09-06 Thread Ian Lynagh
On Thu, Sep 06, 2007 at 10:51:05AM +0100, Simon Peyton-Jones wrote:
 
 (I'm not sure why -fglasgow-exts switches on forall-printing; that
 seems odd.

I think it's because it turns on things like rank-n types.

 Is it really what GHC does?  We should surely have a flag
 for that.)

-f(no-)print-explicit-foralls controls whether or not they're printed
(the flag isn't in GHC  6.7).


Thanks
Ian

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


[GHC] #1667: make install tries to write to /share

2007-09-06 Thread GHC
#1667: make install tries to write to /share
+---
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug| Status:  new
  Priority:  high   |  Milestone:  6.8
 Component:  Compiler   |Version:  6.7
  Severity:  normal |   Keywords: 
Difficulty:  Unknown| Os:  Unknown
  Testcase: |   Architecture:  Unknown
+---
With this configure command
 {{{./configure --prefix=$HOME --with-ghc=/usr/bin/ghc-6.6.1 }}}
 (and all the other usual commands) doing make install gives (it tries to
 write to the /share directory, which should be $HOME/share in my case):

 
 == Finished recursively making `install' for ways: p  debug  thr thr_p
 thr_debug ...
 PWD = /home/foo/haskell/ghc/rts
 
 
 == make install -r;
  in /home/foo/haskell/ghc/libraries
 
 if ifBuildable/ifBuildable base; then \
   cd base  \
   ../installPackage/installPackage  /home/foo $prefix/share/ghc
 /home/foo/share/doc/ghc/libraries /home/foo/haskell/ghc/utils/ghc-pkg/ghc-
 pkg-inplace /home/foo/lib/ghc-6.7.20070906/package.conf; \
 fi
 installPackage: /share: createDirectory: permission denied (Permission
 denied)

 make[1]: *** [install.library.base] Error 1
 make: *** [install] Error 1

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1667
GHC http://www.haskell.org/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: ghci :browse! and type of class methods ([GHC] #1617)

2007-09-06 Thread Claus Reinke
About the it/output thing, I don't know. Can you be more explicit 
about what your question is?


i was worried about using a different method of implementing what
seemed to be the same thing. Simon M cleared up that 'it' is slightly
more complex, due to type dependencies.


Concerning class methods...

| *Main :b! Control.Monad
| fail :: Monad m - forall a. String - m a

I can't explain why this does not print as (Monad m) = ...
I'll try applying your patch when I have a clean build to hand.


thanks, that is my main question about this part. perhaps
i'm just using the wrong printTyThing variant? or there is
a variant missing in the GHC API.


| class C a where c :: (Num b) = a - b
| c :: C a - forall b. (Num b) = a - b

I think the right thing here is to change Type.dropForAlls, 
so that it drops for-alls nested to the right of arrows.  Then 
you'd get   c :: (C a, Num b) = a - b


yes, that makes sense. but i'm wary of those type-manipulating
functions, as they only operate on the structure of the types,
not seeming to look at scopes. what if the inner forall shadows
a type variable binding from the outer forall? or, if i want to
lift the inner forall outwards, what if the inner forall captures
a type variable in the context? do i really have to do all this
myself, just to print out the type associated with a name?


| class C a where c :: forall b. (Num b) = a - b
| c :: forall a. (C a) = forall b. (Num b) = a - b

This *really is* c's type, so it's only honest to say so.


shouldn't the correct type be something that would be 
valid source code as well?


   c :: forall a, b. (C a, Num b) = a - b

the type shouldn't distinguish between class methods and
other overloaded functions, should it?

(I'm not sure why -fglasgow-exts switches on 
forall-printing; that seems odd.  


i'm only following :browse behaviour (comments say
that foralls are printed when the flags would allow them
to be used in source).

claus

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


[GHC] #1668: build system incorrectly includes build.mk unconditionally

2007-09-06 Thread GHC
#1668: build system incorrectly includes build.mk unconditionally
--+-
  Reporter:  [EMAIL PROTECTED]  |  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone: 
 Component:  Build System |Version:  6.7
  Severity:  normal   |   Keywords: 
Difficulty:  Unknown  | Os:  Unknown
  Testcase:   |   Architecture:  Unknown
--+-
./libraries/base/Makefile.local unconditionally includes
 $(TOP)/mk/build.mk when in fact it should do something more along the
 lines of the following:



 ifeq $(Validating) YES
 include $(TOP)/mk/validate-settings.mk
 -include $(TOP)/mk/validate.mk
 else
 -include $(TOP)/mk/build.mk
 # (Optional) build-specific configuration
 #
 endif


 This error causes validation to fail when build.mk contains -Werror, as
 there are things within libraries/base which have not yet been caused to
 be warning-clean.

 Here is a subset of files that mention build.mk and may be worth
 investigating:

 ./configure.ac
 ./distrib/cross-port
 ./distrib/hc-build
 ./mk/boilerplate.mk
 ./mk/config.mk
 ./mk/config.mk.in
 ./mk/install.mk
 ./mk/build.mk
 ./mk/build.mk.sample
 ./bindisttest/Makefile
 ./compiler/ghci/keepCAFsForGHCi.c
 ./compiler/ilxGen/tests/Makefile
 ./compiler/ndpFlatten/TODO
 ./libraries/base/Makefile.local
 ./libraries/Makefile.local
 ./libraries/Makefile
 ./WindowsInstaller/MakeInstaller.txt
 ./Makefile

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1668
GHC http://www.haskell.org/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] #1395: let ./configure check for a GNUreadline framework

2007-09-06 Thread GHC
#1395: let ./configure check for a GNUreadline framework
+---
Reporter:  [EMAIL PROTECTED]|Owner: 
Type:  feature request  |   Status:  closed 
Priority:  normal   |Milestone:  6.8
   Component:  Build System |  Version:  6.6.1  
Severity:  normal   |   Resolution:  fixed  
Keywords:   |   Difficulty:  Easy (1 hr)
  Os:  MacOS X  | Testcase: 
Architecture:  Multiple |  
+---
Changes (by igloo):

  * resolution:  = fixed
  * status:  new = closed

Comment:

 Fixed by:
 {{{
 Thu Sep  6 06:26:28 BST 2007  [EMAIL PROTECTED]
   * Link against GNUreadline.framework, if it's available.
   This can be overridden by setting --with-readline-includes or
   --with-readline-libraries.
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1395
GHC http://www.haskell.org/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] #1669: GHCi debugger underlining is in the wrong place

2007-09-06 Thread GHC
#1669: GHCi debugger underlining is in the wrong place
--+-
  Reporter:  igloo|  Owner: 
  Type:  bug  | Status:  new
  Priority:  normal   |  Milestone:  6.8
 Component:  GHCi |Version:  6.7
  Severity:  normal   |   Keywords: 
Difficulty:  Unknown  | Os:  Unknown
  Testcase:   |   Architecture:  Unknown
--+-
Here's part of the break020 test, in `testsuite/tests/ghc-
 regress/ghci.debugger/scripts`:
 {{{
 % export TERM=vt100
 % ../../../../../compiler/stage2/ghc-inplace --interactive
 GHCi, version 6.7: http://www.haskell.org/ghc/  :? for help
 Loading package base ... linking ... done.
 Prelude :l break020.hs
 [1 of 2] Compiling Break020b( Break020b.hs, interpreted )
 [2 of 2] Compiling Main ( break020.hs, interpreted )
 Ok, modules loaded: Break020b, Main.
 *Main :set stop :list
 *Main :step main
 Stopped at break020.hs:(9,7)-(17,1)
 _result :: IO () = _
 8
 9  main = do
   ^^
 10line1 0
 11line2 0
 12in_another_decl 0
 13in_another_module 0
 14line2 1
 15return ()
 16
 17
^^
 [break020.hs:(9,7)-(17,1)] *Main :steplocal
 Stopped at break020.hs:10:2-8
 _result :: IO () = _
 9  main = do
 10line1 0
  ^^^
 11line2 0
 [break020.hs:10:2-8] *Main
 }}}

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