Re: [GHC] #7489: Obscure warning: Var/Type length mismatch when using GADTs and TypeFamilies

2012-12-23 Thread GHC
#7489: Obscure warning: Var/Type length mismatch when using GADTs and 
TypeFamilies
-+--
  Reporter:  portnov |  Owner:  

  Type:  bug | Status:  merge   

  Priority:  normal  |  Milestone:  

 Component:  Compiler|Version:  7.6.1   

Resolution:  fixed   |   Keywords:  

Os:  Unknown/Multiple|   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time   | Difficulty:  Unknown 

  Testcase:  indexed_types/should_compile/T7489  |  Blockedby:  

  Blocking:  |Related:  

-+--

Comment(by portnov):

 Hi. Thanks for fixing the bug.

 Which version of GHC will include this fix? 7.6.2 or only 7.8 ?

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


[GHC] #7525: Compiler panic with ill-typed code using implicit parameters

2012-12-23 Thread GHC
#7525: Compiler panic with ill-typed code using implicit parameters
---+
Reporter:  parcs   |  Owner:  
Type:  bug | Status:  new 
Priority:  normal  |  Component:  Compiler
 Version:  7.7 |   Keywords:  
  Os:  Unknown/Multiple|   Architecture:  Unknown/Multiple
 Failure:  Compile-time crash  |  Blockedby:  
Blocking:  |Related:  
---+
 The following snippet produces a compiler panic with GHC 7.7.20121221:

 {{{
 {-# LANGUAGE ImplicitParams #-}

 hmm :: ()
 hmm = let ?a = True in ?a

 main = print hmm
 }}}

 Which results in the error message:

 {{{
 [1 of 1] Compiling Main ( bug.hs, bug.o )
 ghc-stage2: panic! (the 'impossible' happened)
   (GHC version 7.7.20121221 for x86_64-unknown-linux):
 ASSERT failed!
 file compiler/typecheck/TcMType.lhs line 407
 Double update of meta tyvar
   t_ajp{tv} [tau[0]]
   Indirect ghc-prim:GHC.Types.Bool{(w) tc 3c}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 Note that the same snippet compiled with GHC 7.6.1 doesn't panic, and
 instead gives a type error:

 {{{
 [1 of 1] Compiling Main ( bug.hs, bug.o )

 bug.hs:4:24:
 Couldn't match type `Bool' with `()'
 When using functional dependencies to combine
   ?a::Bool,
 arising from the implicit-parameter bindings for ?a
 at bug.hs:4:7-25
   ?a::(),
 arising from a use of implicit parameter `?a' at bug.hs:4:24-25
 In the expression: ?a
 In the expression: let ?a = True in ?a
 }}}

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7525
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] #7525: Compiler panic with ill-typed code using implicit parameters

2012-12-23 Thread GHC
#7525: Compiler panic with ill-typed code using implicit parameters
---+
Reporter:  parcs   |  Owner:  
Type:  bug | Status:  new 
Priority:  normal  |  Component:  Compiler
 Version:  7.7 |   Keywords:  
  Os:  Unknown/Multiple|   Architecture:  Unknown/Multiple
 Failure:  Compile-time crash  |  Blockedby:  
Blocking:  |Related:  
---+

Comment(by parcs):

 On second thought, this is probably an easier snippet to debug (I can't
 edit the description of the ticket for some reason):

 {{{
 {-# LANGUAGE ImplicitParams #-}
 module Bug where

 hmm :: ()
 hmm = let ?a = True in ?a
 }}}

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


Re: [GHC] #7489: Obscure warning: Var/Type length mismatch when using GADTs and TypeFamilies

2012-12-23 Thread GHC
#7489: Obscure warning: Var/Type length mismatch when using GADTs and 
TypeFamilies
-+--
  Reporter:  portnov |  Owner:  

  Type:  bug | Status:  merge   

  Priority:  normal  |  Milestone:  

 Component:  Compiler|Version:  7.6.1   

Resolution:  fixed   |   Keywords:  

Os:  Unknown/Multiple|   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time   | Difficulty:  Unknown 

  Testcase:  indexed_types/should_compile/T7489  |  Blockedby:  

  Blocking:  |Related:  

-+--

Comment(by simonpj):

 I think it can get into 7.6 if Ian does the merge before the (imminent)
 release.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7489#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] #709: Fixup too large error with -fasm on PowerPC

2012-12-23 Thread GHC
#709: Fixup too large error with -fasm on PowerPC
--+-
  Reporter:  simonmar |  Owner:
  Type:  bug  | Status:  patch 
  Priority:  low  |  Milestone:  6.8.1 
 Component:  Compiler (NCG)   |Version:  7.7   
Resolution:   |   Keywords:
Os:  Unknown/Multiple |   Architecture:  powerpc   
   Failure:  Building GHC failed  | Difficulty:  Moderate (less than a day)
  Testcase:   |  Blockedby:
  Blocking:   |Related:
--+-

Comment(by PHO):

 OK I revised my fix to
 [https://github.com/phonohawk/ghc/compare/master...ticket-709 a series of
 3 patches]. Could you review it?

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


Updating commentary about PrimOps and codegen

2012-12-23 Thread Jan Stolarek
Hi all,

I've been reading Commentary about PrimOps and code generation and I noticed 
that it is partially 
outdated (e.g. references to old code gen files: compiler/codeGen/CgPrimOp.hs):

http://hackage.haskell.org/trac/ghc/wiki/Commentary/PrimOps
http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/CodeGen

Would anyone be so kind to update these pages and possibly other pages about 
code generation, STG, 
Cmm and related stuff? I've been trying to figure out how to add new PrimOps 
and having up to 
date documentation would be most helpful.

Janek

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


[Haskell] ANN: Disciplined Disciple Compiler (DDC) 0.3.1

2012-12-23 Thread Ben Lippmeier

The Disciplined Disciple Compiler Strike Force is pleased to announce the 
release of DDC 0.3.1. 

DDC is a research compiler used to investigate program transformation in the 
presence of computational effects. This is a development release. There is 
enough implemented to experiment with the core language, but not enough to 
write real programs.

New Features

 * Compilation via C and LLVM for first-order programs.
 * Cross-module inlining.
 * An effect-aware rewrite rule framework.
 * Generation of LLVM aliasing and constancy meta-data.
 * More program transformations:
Beta (substitute), Bubble (move type-casts), Elaborate (add witnesses),
Flatten (eliminate nested bindings), Forward (let-floating),
Namify (add names), Prune (dead-code elimination), Snip (eliminate nested 
applications).


People
~~
 The following people contributed to DDC since the last release:
 Tran Ma- LLVM aliasing and constancy meta-data.
 Amos Robinson  - Rewrite rule system and program transforms.
 Erik de Castro Lopo- Build framework.
 Ben Lippmeier  - Code generators, framework, program transforms.


Full release notes: 
  http://code.ouroborus.net/ddc/ddc-stable/RELEASE

Further reading:
  http://disciple.ouroborus.net/

For the impatient:
  cabal update; cabal install ddc-tools







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


Re: [Haskell-cafe] Fighting research paper bit-rot

2012-12-23 Thread Herbert Valerio Riedel

cheater cheater cheate...@gmail.com writes:
 after yet another episode of trying to figure out why library code
 doesn't make any sense when reading the related paper, I decided to
 start a small wiki just for the purpose of describing differences
 between what's in the paper and what's in the code.

 The first article can be found at:

 http://functionalpapersupdated.wikia.com/wiki/Transactional_memory_with_data_invariants

fyi, there's a wiki page dedicated to comment on SPJ's papers at

 http://www.haskell.org/haskellwiki/Simonpj/Talk:Papers

cheers,
  hvr

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


Re: [Haskell-cafe] Layer on a layer of record syntax in the type synonym?

2012-12-23 Thread Antoine Latter
You could look into the Generic Monoid solution proposed in your
other thread, then you wouldn't need your Socket types  - you would
use the Generic Monoid machinery to make a Monoid instance for
whatever type needed it.

This approach loses some type-safety, as you might pass on version of
a Scoket3 to a function that was meant to take a different type of
Socket3.

On Fri, Dec 21, 2012 at 4:50 PM, Christopher Howard
christopher.how...@frigidcode.com wrote:
 On 12/21/2012 04:52 AM, Daniel Trstenjak wrote:

 Why having a Socket3 in the first place, what's the point of it?


 The idea was to have some generic structures (Sockets) which were
 already instanced into the Monoids-within-Monoids abstraction, yet could
 still be made concrete into anything more specific.

 So, I have...

 code:
 
 data Socket3 a b c = Socket3 a b c
   deriving (Show)

 instance (Monoid a, Monoid b, Monoid c) = Monoid (Socket3 a b c) where
 mempty = Socket3 mempty mempty mempty
 Socket3 a b c `mappend` Socket3 w x y =
 Socket3 (a  w) (b  x) (c  y)

 nullSocket3 :: (Monoid a, Monoid b, Monoid c) = Socket3 a b c
 nullSocket3 = Socket3 mempty mempty mempty
 

 ...which allows me to have...

 code:
 
 type ShipSys = Socket3 (Last Engine) (Last RotThruster) [LinThruster]

 nullShipSys :: ShipSys
 nullShipSys = nullSocket3

 setEngineSocket (Socket3 a b c) x = Socket3 x b c

 engineSys :: Engine - ShipSys
 engineSys a = setEngineSocket nullShipSys (Last (Just a))

 mk1Engine = engineSys (Engine 100 1 Mark I)

 -- etc.
 

 And so, with each individual component being wrapped as a generic
 ShipSys (ship system), I can make a complete system simply by composition:

 code:
 
 h :t mk1Engine
 mk1Engine :: ShipSys
 h :t stdRearThruster
 stdRearThruster :: ShipSys
 h :t stdFrontThruster
 stdFrontThruster :: ShipSys
 h :t stdRotThruster
 stdRotThruster :: Power - ShipSys
 h mk1Engine  stdRearThruster  stdFrontThruster  stdRotThruster 10
 Socket3 (Last {getLast = Just (Engine 100.0 1.0 Mark I)}) (Last
 {getLast = Just (RotThruster 10.0)}) [LinThruster 3.1415927
 1.0,LinThruster 0.0 0.5]
 

 This seems to work well enough so far. But the issue I was concerned
 about is: if I can't layer record syntax onto the type synonym, then I
 have to rewrite a whole bunch of getters / setters each time I want to
 add an attribute (e.g., requiring a switch from a Socket3 to a Socket4.)
 If this is the case, then perhaps it would be better just to define the
 ShipSys type directly, and directly instance it into the monoid abstraction.

 --
 frigidcode.com


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


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