Re: [GHC] #3850: EmptyDataDecls and type context

2010-02-14 Thread GHC
#3850: EmptyDataDecls and type context
+---
  Reporter:  Paczesiowa |  Owner:  igloo   
  Type:  merge  | Status:  closed  
  Priority:  normal |  Milestone:  
 Component:  Compiler   |Version:  6.12.1  
Resolution:  fixed  |   Keywords:  emptydatadecls  
Difficulty: | Os:  Unknown/Multiple
  Testcase: |   Architecture:  Unknown/Multiple
   Failure:  GHC rejects valid program  |  
+---
Changes (by igloo):

  * status:  new = closed
  * resolution:  = fixed


Comment:

 Merged.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:6
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] #3850: EmptyDataDecls and type context

2010-02-08 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|Owner:  igloo
Type:  merge |   Status:  new  
Priority:  normal|Milestone:   
   Component:  Compiler  |  Version:  6.12.1   
Keywords:  emptydatadecls|   Difficulty:   
  Os:  Unknown/Multiple  | Testcase:   
Architecture:  Unknown/Multiple  |  Failure:  GHC rejects valid program
-+--
Changes (by simonpj):

  * owner:  = igloo
  * type:  bug = merge


Comment:

 OK well I still think it's stupid, but I accept that it's a needless
 change in behaviour from 6.10, so I'll make 6.12 accept the declaration
 just as 6.10 did. That way you won't have to change HList.
 {{{
 Mon Feb  8 16:37:51 GMT 2010  simo...@microsoft.com
   * Fix Trac #3850

   This patch simply avoids a needless difference in behaviour from
   6.10, and one that happens to affect HList. See Note [Stupid theta].
 }}}
 Please merge to 6.12 branch.

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:5
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] #3850: EmptyDataDecls and type context

2010-02-02 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|Owner:   
Type:  bug   |   Status:  new  
Priority:  normal|Milestone:   
   Component:  Compiler  |  Version:  6.12.1   
Keywords:  emptydatadecls|   Difficulty:   
  Os:  Unknown/Multiple  | Testcase:   
Architecture:  Unknown/Multiple  |  Failure:  GHC rejects valid program
-+--

Comment(by Paczesiowa):

 I don't have anything to do with this, maybe you should ask Oleg about
 such definition for labels.
 I just wanted to fix HList (it fails to compile with 6.12) and I've
 discovered, that 6.12 works different than 6.10 and also reports really
 misleading error message. So, I'm not interested in making this usage work
 like in 6.10, but there should be a better error message and some info in
 docs, that the behavior changed.

 Oleg's code: http://old-darcs.well-typed.com/HList/Data/HList/Label2.hs

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:2
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] #3850: EmptyDataDecls and type context

2010-02-02 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|Owner:   
Type:  bug   |   Status:  new  
Priority:  normal|Milestone:   
   Component:  Compiler  |  Version:  6.12.1   
Keywords:  emptydatadecls|   Difficulty:   
  Os:  Unknown/Multiple  | Testcase:   
Architecture:  Unknown/Multiple  |  Failure:  GHC rejects valid program
-+--

Comment(by guest):

 I believe contexts on data declarations might not be totally useless, even
 if there are no constructors. The HList code in question had the
 following declaration

 data HNat x = Label x ns desc  -- labels are exclusively type-level
 entities

 The context HNat is asserted not because we want to use any of HNat's
 methods. Rather, the constraint HNat was asserted as a kind predicate --
 to
 show to the user that the type variable x is of a kind natural
 numbers, so to speak. Therefore, the type (Label HZero Foo Foo) is the
 correct instance of label.  On the other hand, the type (Label Bool
 Foo Foo) is not a correct instance and will be flagged as such by the
 compiler.

 Oleg

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:3
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] #3850: EmptyDataDecls and type context

2010-02-02 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|Owner:   
Type:  bug   |   Status:  new  
Priority:  normal|Milestone:   
   Component:  Compiler  |  Version:  6.12.1   
Keywords:  emptydatadecls|   Difficulty:   
  Os:  Unknown/Multiple  | Testcase:   
Architecture:  Unknown/Multiple  |  Failure:  GHC rejects valid program
-+--

Comment(by simonpj):

 What makes you think that GHC will reject the type `(Label Bool Foo Foo)`?
 I don't think it will.

 The only effect of a context on a data decl is that a use of the
 constructor, either in pattern matching or in an expression, gives rise to
 that constraint.  That's all.

 So the constraint is no more than a comment.  I suggest you use a comment!

 I'm really want a proper kind system, though.  It's silly that we can't
 give the kind of Label.  But contexts are not the way to do it.

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:4
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] #3850: EmptyDataDecls and type context

2010-02-01 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|Owner:   
Type:  bug   |   Status:  new  
Priority:  normal|Milestone:   
   Component:  Compiler  |  Version:  6.12.1   
Keywords:  emptydatadecls|   Difficulty:   
  Os:  Unknown/Multiple  | Testcase:   
Architecture:  Unknown/Multiple  |  Failure:  GHC rejects valid program
-+--

Comment(by simonpj):

 Why do you want this?  It's utterly useless.  Contexts on data
 declarations are a mis-feature of Haskell, and are especially useless when
 there are no constructors.  Can't you just delete it?

 Simon

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850#comment:1
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] #3850: EmptyDataDecls and type context

2010-01-31 Thread GHC
#3850: EmptyDataDecls and type context
-+--
Reporter:  Paczesiowa|   Owner:   
Type:  bug   |  Status:  new  
Priority:  normal|   Component:  Compiler 
 Version:  6.12.1|Keywords:  emptydatadecls   
  Os:  Unknown/Multiple  |Testcase:   
Architecture:  Unknown/Multiple  | Failure:  GHC rejects valid program
-+--
 the following code fails to parse correctly or typecheck under 6.12.1


 {{{
 {-# LANGUAGE EmptyDataDecls #-}
 data Show a = Foo a
 }}}


 error:


 {{{
 No context is allowed on a GADT-style data declaration
 (You can put a context on each contructor, though.)
 }}}


 it works with 6.10.

 this is the reason of HList failure on 6.12.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3850
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