Haskell.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ghc-tickets

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2013 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
ghc-tickets@haskell.org

April 2013

  • 1 participants
  • 395 discussions
[GHC] #7865: SpecConstr duplicating computations
by GHC 03 May '13

03 May '13
#7865: SpecConstr duplicating computations ------------------------------------+--------------------------------------- Reporter: amosrobinson | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: | Keywords: SpecConstr Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Runtime performance bug | Blockedby: Blocking: | Related: ------------------------------------+--------------------------------------- In some (very rare) cases, SpecConstr can actually duplicate let bindings. When SpecConstr sees something like {{{ let tuple = (let x = expensive in x, simple) case tuple of (a,b) -> a + a }}} it records the value of tuple, and replaces the case with {{{ (let x = expensive in x) + (let x = expensive in x) }}} Usually we wouldn't notice this, because the Simplifier would let-float expensive out of the tuple before SpecConstr runs. In some cases though, the tuple constructor will only be exposed after specialisation happens. To test, compile TSpecConstr_DoubleInline with {{{ ghc TSpecConstr_DoubleInline.hs -O2 -fspec-constr -dverbose-core2core -fforce-recomp -dppr-case-as-let -dsuppress-all | less }}} and search for the SpecConstr pass. The first specialisation is {{{ $srecursive_sf3 $srecursive_sf3 = \ sc_seR sc_seS sc_seT sc_seU -> let { a'_sep a'_sep = (let { I# x_adP ~ _ <- expensive sc_seR } in I# (*# x_adP 2), sc_seR) } in let { ds_seq ds_seq = recursive (: sc_seR (: sc_seR (: sc_seS sc_seT))) (sc_seR, let { I# x_adP ~ _ <- expensive sc_seR } in I# (*# x_adP 2)) } in (let { (p_XdA, q_Xdu) ~ _ <- ds_seq } in let { I# x_ae7 ~ _ <- p_XdA } in let { I# y_aeb ~ _ <- let { I# x_adP ~ _ <- expensive sc_seR } in I# (*# x_adP 2) } in I# (+# x_ae7 y_aeb), let { (p_adg, q_XdA) ~ _ <- ds_seq } in let { I# x_ae7 ~ _ <- q_XdA } in let { I# y_aeb ~ _ <- sc_seR } in I# (+# x_ae7 y_aeb)) }}} With three calls to expensive. If you look at the -ddump-prep, one of the calls is simplified out, but there is still one too many at the end. This is happening on at least 7.4.1 and head. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7865> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 5
0 0
[GHC] #7862: Could not deduce (A) from the context (A, ...)
by GHC 03 May '13

03 May '13
#7862: Could not deduce (A) from the context (A, ...) --------------------------------------+------------------------------------- Reporter: alang9 | Owner: Type: bug | Status: new Priority: normal | Component: Compiler (Type checker) Version: 7.6.2 | Keywords: Os: Linux | Architecture: x86_64 (amd64) Failure: GHC rejects valid program | Blockedby: Blocking: | Related: --------------------------------------+------------------------------------- The following code doesn't compile and produces a strange error: {{{ {-# LANGUAGE TypeFamilies, FlexibleContexts #-} module Numeric.AD.Internal.Tower () where type family Scalar t newtype Tower s a = Tower [a] type instance Scalar (Tower s a) = a class (Num (Scalar t), Num t) => Mode t where (<+>) :: t -> t -> t instance (Num a) => Mode (Tower s a) where Tower as <+> _ = undefined where _ = (Tower as) <+> (Tower as) instance Num a => Num (Tower s a) where }}} {{{ src/Numeric/AD/Internal/Tower.hs:17:24: Could not deduce (Num (Scalar (Tower s a))) arising from a use of `<+>' from the context (Num (Scalar (Tower s a)), Num (Tower s a), Num a) bound by the instance declaration at src/Numeric/AD/Internal/Tower.hs:14:10-36 Possible fix: add an instance declaration for (Num (Scalar (Tower s a))) In the expression: (Tower as) <+> (Tower as) In a pattern binding: _ = (Tower as) <+> (Tower as) In an equation for `<+>': (Tower as) <+> _ = undefined where _ = (Tower as) <+> (Tower as) }}} Furthermore, Removing the {{{Num (Scalar t)}}} constraint from the {{{Mode}}} class produces a different strange error: {{{ src/Numeric/AD/Internal/Tower.hs:17:24: Overlapping instances for Num (Tower s0 a) arising from a use of `<+>' Matching givens (or their superclasses): (Num (Tower s a)) bound by the instance declaration at src/Numeric/AD/Internal/Tower.hs:14:10-36 Matching instances: instance Num a => Num (Tower s a) -- Defined at src/Numeric/AD/Internal/Tower.hs:19:10 (The choice depends on the instantiation of `a, s0') In the expression: (Tower as) <+> (Tower as) In a pattern binding: _ = (Tower as) <+> (Tower as) In an equation for `<+>': (Tower as) <+> _ = undefined where _ = (Tower as) <+> (Tower as) }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7862> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 4
0 0
[GHC] #7873: A poly-kinded newtype existential crisis
by GHC 03 May '13

03 May '13
#7873: A poly-kinded newtype existential crisis --------------------------------------+------------------------------------- Reporter: ekmett | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: GHC rejects valid program | Blockedby: Blocking: | Related: --------------------------------------+------------------------------------- The following code worked on older GHCs and on other compilers clear back to Hugs, but based on reports I'm getting from a half-dozen users appears to broken on GHC 7.6.1+ and in GHC HEAD. {{{ class Reifies s a | s -> a where reflect :: proxy s -> a data Proxy a = Proxy newtype Magic a r = Magic (forall s. Reifies s a => Proxy s -> r) }}} {{{ fast/Data/Reflection.hs:92:21: A newtype constructor cannot have an existential context, but `Magic' does In the definition of data constructor `Magic' }}} There doesn't appear to be anything existential going on there, but that said, this issue does only occur when PolyKinds are turned on, so perhaps the issue is with the desugaring into PolyKinds? -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7873> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 9
0 0
[GHC] #7872: :info does not display "forall" for a synonym
by GHC 03 May '13

03 May '13
#7872: :info does not display "forall" for a synonym ----------------------------------------------+----------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.3 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Incorrect warning at compile-time | Blockedby: Blocking: | Related: ----------------------------------------------+----------------------------- Define: {{{ data A = A (forall a. a) type B = forall a. a }}} and in ghci we see: {{{ Prelude> :i A data A = A (forall a. a) -- OK Prelude> :i B type B = a -- "forall" missing }}} This is a minor issue, but since "type B = a" is not valid Haskell I'm reporting it. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7872> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
[GHC] #7861: deferred type error with rankNTypes
by GHC 02 May '13

02 May '13
#7861: deferred type error with rankNTypes -------------------------------+-------------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.2 | Keywords: Os: Linux | Architecture: x86_64 (amd64) Failure: Compile-time crash | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- {-# LANGUAGE RankNTypes #-} type A a = forall b. (a -> b) -> b doA :: (a -> b) -> A a -> b doA f l = l f -- f :: A a -> [a] -> [a] -- correct type f :: A a -> a -- wrong type f = doA (:) main = return () -- compiled with wrong type and -fdefer-type-errors -- gives ghc panic -- F.hs:10:5: Warning: -- Occurs check: cannot construct the infinite type: a0 = [a0] -> [a0] -- Expected type: A a -> a -- Actual type: A a0 -> a -- In the return type of a call of `doA' -- In the expression: doA (:) -- In an equation for `f': f = doA (:) -- -- F.hs:10:9: Warning: -- Couldn't match type `a' with `[a0] -> [a0]' -- `a' is a rigid type variable bound by -- the type signature for f :: A a -> a at F.hs:9:6 -- Expected type: a0 -> a -- Actual type: a0 -> [a0] -> [a0] -- In the first argument of `doA', namely `(:)' -- In the expression: doA (:) -- In an equation for `f': f = doA (:) -- ghc: panic! (the 'impossible' happened) -- (GHC version 7.6.2 for x86_64-unknown-linux): -- evTermCoercion -- error @ghc-prim:GHC.Prim.Any{(w) tc 31N} -- ghc-prim:GHC.Prim.*{(w) tc 34d} -- ghc-prim:GHC.Types.~{(w) tc 31Q} ([ghc-prim:GHC.Prim.Any{(w) tc 31N} -- ghc-prim:GHC.Prim.*{(w) tc 34d}] -- -> [ghc- prim:GHC.Prim.Any{(w) tc 31N} -- ghc- prim:GHC.Prim.*{(w) tc 34d}]) -- F.hs:10:5: -- Occurs check: cannot construct the infinite type: a0 = [a0] -> [a0] -- Expected type: A a -> a -- Actual type: A a0 -> a -- In the return type of a call of `doA' -- In the expression: doA (:) -- In an equation for `f': f = doA (:) -- (deferred type error) -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7861> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 4
0 0
Re: [GHC] #4466: Add extension for type application
by GHC 30 Apr '13

30 Apr '13
#4466: Add extension for type application ---------------------------------+------------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: new Priority: low | Milestone: 7.6.2 Component: Compiler | Version: 6.12.3 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by kosmikus): * cc: mail@… (added) -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4466#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5296: Add explicit type applications
by GHC 30 Apr '13

30 Apr '13
#5296: Add explicit type applications ----------------------------------------+----------------------------------- Reporter: dsf | Owner: Type: feature request | Status: new Priority: low | Milestone: 7.6.2 Component: Compiler (Type checker) | Version: 7.0.3 Keywords: | Os: Linux Architecture: x86_64 (amd64) | Failure: GHC rejects valid program Difficulty: | Testcase: Blockedby: 1897 | Blocking: Related: | ----------------------------------------+----------------------------------- Changes (by kosmikus): * cc: mail@… (added) -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5296#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5296: Add explicit type applications
by GHC 30 Apr '13

30 Apr '13
#5296: Add explicit type applications ----------------------------------------+----------------------------------- Reporter: dsf | Owner: Type: feature request | Status: new Priority: low | Milestone: 7.6.2 Component: Compiler (Type checker) | Version: 7.0.3 Keywords: | Os: Linux Architecture: x86_64 (amd64) | Failure: GHC rejects valid program Difficulty: | Testcase: Blockedby: 1897 | Blocking: Related: | ----------------------------------------+----------------------------------- Changes (by sweirich): * cc: sweirich@… (added) -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5296#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #4466: Add extension for type application
by GHC 30 Apr '13

30 Apr '13
#4466: Add extension for type application ---------------------------------+------------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: new Priority: low | Milestone: 7.6.2 Component: Compiler | Version: 6.12.3 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by sweirich): * cc: sweirich@… (added) -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4466#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
[GHC] #7868: Enable -funbox-strict-small-fields by default
by GHC 30 Apr '13

30 Apr '13
#7868: Enable -funbox-strict-small-fields by default -----------------------------+---------------------------------------------- Reporter: tibbe | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- See discussion at http://www.haskell.org/pipermail/ghc- devs/2013-April/001109.html Summary from the commit message: {{{ Enable -funbox-small-strict-fields by default The flag shows no real impact on nofib benchmarks and GHC itself, which is expected given the small number of strict but not already unpacked fields in the source of these programs. However, the flag allows us to omit most of the UNPACK pragmas that are so common in source code today. }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7868> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 3
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 40
  • Older →

HyperKitty Powered by HyperKitty version 1.3.9.