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

September 2013

  • 3 participants
  • 648 discussions
Re: [GHC] #2110: Rules to eliminate casted id's
by GHC 15 Sep '13

15 Sep '13
#2110: Rules to eliminate casted id's -------------------------------------+------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: new Priority: lowest | Milestone: 7.6.2 Component: Compiler | Version: 6.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by nomeata): Please allow me to use this as a notepad; this way I (or someone else) can easily find the thoughts later. With `Coercible` in GHC, one might want that {{{ {-# RULES "myMap/coerce" myMap coerce = coerce #-} }}} will be a usable rule that would also fire in {{{ foo :: [Int] -> [Age] foo = myMap Age }}} At the moment, it does not do that yet. Here is the rule (as shown by `-ddump-rules`, with `-O`): {{{ ==================== Tidy Core rules ==================== "myMap/coerce" [ALWAYS] forall (@ t) (@ t1) ($dCoercible :: GHC.Types.Coercible t t1). Test.myMap @ t @ t1 (GHC.Prim.coerce @ t @ t1 $dCoercible) = GHC.Prim.coerce @ [t] @ [t1] (case $dCoercible of _ { GHC.Types.MkCoercible ds -> GHC.Types.MkCoercible @ [t] @ [t1] @~ [ds]_R }) }}} and here is the Core code the rule needs to match (`-ddump-simpl`, with `-O`): {{{ Test.foo1 :: GHC.Types.Int -> GHC.Types.Int [GblId, Arity=1, Caf=NoCafRefs, Str=DmdType <S,1*U(U)>m, Unf=Unf{Src=InlineStable, TopLvl=True, Arity=1, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(unsat_ok=True,boring_ok=True) Tmpl= \ (tpl_B1 [Occ=Once] :: GHC.Types.Int) -> tpl_B1}] Test.foo1 = \ (tpl_B1 :: GHC.Types.Int) -> tpl_B1 Test.foo :: [GHC.Types.Int] -> [Test.Age] [GblId, Arity=1, Str=DmdType, Unf=Unf{Src=<vanilla>, TopLvl=True, Arity=0, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}] Test.foo = Test.foo_myMap @ GHC.Types.Int @ Test.Age (Test.foo1 `cast` (<GHC.Types.Int>_R -> Sym Test.NTCo:Age[0] :: (GHC.Types.Int -> GHC.Types.Int) ~# (GHC.Types.Int -> Test.Age))) }}} Note that in the rule’s LHS, `coerce` was not unfolded, while it is in the core. Also note that the rule talks about a `Coercion` value that we do not have. Here is one plan that might work. If a rule has a binder `$d` of type `Coercible a b`, then the rule is changed to have a binder `c` of type `a ~R# b`, and every occurrence of `$d` is replaced by `MkCoercible a b c`. So the rule above, (after simplification of the RHS) would read {{{ "myMap/coerce" [ALWAYS] forall (@ t) (@ t1) (c :: t ~R# t1). Test.myMap @ t @ t1 (GHC.Prim.coerce @ t @ t1 (GHC.Types.MkCoercible @ t @ t1 @~ c) = GHC.Prim.coerce @ [t] @ [t1] (GHC.Types.MkCoercible @ [t] @ [t1] @~ [c]_R) }}} The next step is to simplify occurrences of `coerce @ a @ b (MkCoercible @ a @ b @~ c)` and replace them by (id `cast` c): {{{ "myMap/coerce" [ALWAYS] forall (@ t) (@ t1) (c :: t ~R# t1). Test.myMap @ t @ t1 (id `cast` c) = GHC.Prim.coerce @ [t] @ [t1] (GHC.Types.MkCoercible @ [t] @ [t1] @~ [c]_R) }}} which (possibly after inlining id) with some reasonable hope matches the actual code. I especially like how the specializing of `Coercible` values to `~R#` values allows to use the matched coercion (which could even come from a `unsafeCoerce`!) in the RHS of the rule, instead of completely throwing it away and firing only if the coercion on the RHS can be found by the type checker. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2110#comment:36> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #6166: Performance regression in mwc-random since 7.0.x
by GHC 15 Sep '13

15 Sep '13
#6166: Performance regression in mwc-random since 7.0.x --------------------------------------------+------------------------------ Reporter: bos | Owner: Type: bug | Status: new Priority: high | Milestone: 7.6.2 Component: Compiler | Version: 7.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: Runtime performance bug | (amd64) Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: --------------------------------------------+------------------------------ Comment (by Khudyakov): Bug is still present in 7.6.3. I've made a reduced test case with stripped-down standard inlined. Note taht adding or removing return in main loop have no effect. Something interesting is going on with blocks. Replacing f with constant or removing cons all makes bug go away. Simplifying go function changes runtime drastically. {{{ {-# LANGUAGE BangPatterns #-} import qualified Data.Vector.Unboxed as I import Control.Monad.Primitive (PrimMonad, PrimState) import Data.Word import Data.Bits import Control.Monad import System.Random.MWC main :: IO () main = do g <- create replicateM_ (200*1000) $ standard g standard :: PrimMonad m => Gen (PrimState m) -> m Double {-# INLINE standard #-} standard gen = do u <- (subtract 1 . (*2)) `liftM` uniform gen ri <- uniform gen let i = fromIntegral ((ri :: Word32) .&. 127) bi = (I.!) blocks i return $! u * bi where blocks = I.cons r -- Removing cons $ I.unfoldrN 130 go $ T r f where go (T b g) = let !u = T h (exp (-0.5 * h * h)) h = sqrt (-2 * log (v / b + g)) in Just (h, u) {-# NOINLINE blocks #-} v = 9.91256303526217e-3 r = 3.442619855899 f = exp (-0.5 * r * r) -- Replacing with constant make bug go away! -- Unboxed 2-tuple data T = T {-# UNPACK #-} !Double {-# UNPACK #-} !Double }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/6166#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5435: GHCi linker should run constructors for linked libraries
by GHC 15 Sep '13

15 Sep '13
#5435: GHCi linker should run constructors for linked libraries -------------------------------------+------------------------------------ Reporter: pumpkin | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 3658 Blocking: 7746, 8199 | Related Tickets: #3658 -------------------------------------+------------------------------------ Comment (by ezyang): See, what I don't understand is why the dynamic case isn't working; it shouldn't be exercising any of our code. OK, what happens when you run this set of commands? {{{ ezyang@javelin:~/Dev/ghc-build-july/testsuite/tests/rts$ objdump -h T5435_c_dyn.o T5435_c_dyn.o: file format elf64-x86-64 Sections: Idx Name Size VMA LMA File off Algn 0 .text 00000048 0000000000000000 0000000000000000 00000040 2**2 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 1 .data 00000000 0000000000000000 0000000000000000 00000088 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000000 0000000000000000 0000000000000000 00000088 2**2 ALLOC 3 .rodata 00000022 0000000000000000 0000000000000000 00000088 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .init_array 00000010 0000000000000000 0000000000000000 000000b0 2**3 CONTENTS, ALLOC, LOAD, RELOC, DATA 5 .comment 0000002b 0000000000000000 0000000000000000 000000c0 2**0 CONTENTS, READONLY 6 .note.GNU-stack 00000000 0000000000000000 0000000000000000 000000eb 2**0 CONTENTS, READONLY 7 .eh_frame 00000058 0000000000000000 0000000000000000 000000f0 2**3 CONTENTS, ALLOC, LOAD, RELOC, READONLY, DATA ezyang@javelin:~/Dev/ghc-build-july/testsuite/tests/rts$ objdump -s -j .init_array T5435_c_dyn.o T5435_c_dyn.o: file format elf64-x86-64 Contents of section .init_array: 0000 00000000 00000000 00000000 00000000 ................ ezyang@javelin:~/Dev/ghc-build-july/testsuite/tests/rts$ objdump -r -j .init_array T5435_c_dyn.o T5435_c_dyn.o: file format elf64-x86-64 RELOCATION RECORDS FOR [.init_array]: OFFSET TYPE VALUE 0000000000000000 R_X86_64_64 .text 0000000000000008 R_X86_64_64 .text+0x0000000000000024 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5435#comment:25> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5435: GHCi linker should run constructors for linked libraries
by GHC 15 Sep '13

15 Sep '13
#5435: GHCi linker should run constructors for linked libraries -------------------------------------+------------------------------------ Reporter: pumpkin | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 3658 Blocking: 7746, 8199 | Related Tickets: #3658 -------------------------------------+------------------------------------ Comment (by simonmar): {{{ $ make T5435_v rm -f T5435_c_v.o T5435_v '/playpen/validate/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -v0 -c T5435.c -o T5435_c_v.o '/playpen/validate/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -v0 T5435.hs -o T5435_v ./T5435_v T5435_c_v.o success $ make T5435_dyn rm -f T5435_c_dyn.o T5435_dyn '/playpen/validate/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -v0 -dynamic -fPIC -c T5435.c -o T5435_c_dyn.o '/playpen/validate/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -v0 -dynamic -fPIC T5435.hs -o T5435_dyn ./T5435_dyn T5435_c_dyn.o success }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5435#comment:24> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5435: GHCi linker should run constructors for linked libraries
by GHC 14 Sep '13

14 Sep '13
#5435: GHCi linker should run constructors for linked libraries -------------------------------------+------------------------------------ Reporter: pumpkin | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 3658 Blocking: 7746, 8199 | Related Tickets: #3658 -------------------------------------+------------------------------------ Changes (by ezyang): * status: new => infoneeded Comment: I fixed the thread safety issue, but I'll need more help reproducing the error. What happens if you run `make T5435_v`; can you post all the output? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5435#comment:23> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #5435: GHCi linker should run constructors for linked libraries
by GHC 14 Sep '13

14 Sep '13
#5435: GHCi linker should run constructors for linked libraries -------------------------------------+------------------------------------ Reporter: pumpkin | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.2.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: 3658 Blocking: 7746, 8199 | Related Tickets: #3658 -------------------------------------+------------------------------------ Comment (by simonmar): I'm seeing failures in `T5435_v` and `T5435_dyn` here: {{{ =====> T5435_v(normal) 2962 of 3788 [0, 0, 1] cd ./rts && $MAKE -s --no-print-directory T5435_v </dev/null >T5435_v.run.stdout 2>T5435_v.run.stderr Actual stdout output differs from expected: --- ./rts/T5435_v.stdout 2013-09-14 19:51:59.426916358 +0100 +++ ./rts/T5435_v.run.stdout 2013-09-14 20:54:07.282839857 +0100 @@ -1,3 +1 @@ -initializer1 run -initializer2 run success *** unexpected failure for T5435_v(normal) }}} Also you need to make these tests safe to run in parallel, I got this failure with THREADS=2: {{{ Stderr: /usr/bin/ld: T5435.o: invalid string offset 4519 >= 1388 for section `.strtab' /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: ld returned 1 exit status make[3]: *** [T5435_v] Error 1 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5435#comment:22> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #910: --make should have a -j flag for parallel building
by GHC 14 Sep '13

14 Sep '13
#910: --make should have a -j flag for parallel building -------------------------------------+------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: patch Priority: normal | Milestone: _|_ Component: Compiler | Version: 6.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: N/A | Blocked By: 8184, 8235 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by refold): Replying to [comment:58 parcs]: > Nope, passing `+RTS -Nn` is not necessary. The number of capabilities will be set at runtime according to the `-jn` flag. Great. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/910#comment:59> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #910: --make should have a -j flag for parallel building
by GHC 14 Sep '13

14 Sep '13
#910: --make should have a -j flag for parallel building -------------------------------------+------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: patch Priority: normal | Milestone: _|_ Component: Compiler | Version: 6.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: N/A | Blocked By: 8184, 8235 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by parcs): Replying to [comment:57 refold]: > @parcs > > Yes, I'm working on this, though I had some delays. One problem is that we've already released Cabal 1.18, so this feature will have to go into Cabal 1.19. Okay, great. > Do I understand corectly that right now one must pass `+RTS -Nn` to GHC if one wants it to use `n` OS threads? Nope, passing `+RTS -Nn` is not necessary. The number of capabilities will be set at runtime according to the `-jn` flag. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/910#comment:58> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #910: --make should have a -j flag for parallel building
by GHC 14 Sep '13

14 Sep '13
#910: --make should have a -j flag for parallel building -------------------------------------+------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: patch Priority: normal | Milestone: _|_ Component: Compiler | Version: 6.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: N/A | Blocked By: 8184, 8235 Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by refold): @parcs Yes, I'm working on this, though I had some delays. One problem is that we've already released Cabal 1.18, so this feature will have to go into Cabal 1.19. Do I understand corectly that right now one must pass `+RTS -Nn` to GHC if one wants it to use `n` OS threads? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/910#comment:57> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #2110: Rules to eliminate casted id's
by GHC 14 Sep '13

14 Sep '13
#2110: Rules to eliminate casted id's -------------------------------------+------------------------------------ Reporter: igloo | Owner: Type: feature request | Status: new Priority: lowest | Milestone: 7.6.2 Component: Compiler | Version: 6.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by bgamari): * cc: bgamari@… (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/2110#comment:35> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • ...
  • 65
  • Older →

HyperKitty Powered by HyperKitty version 1.3.9.