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

July 2017

  • 1 participants
  • 1107 discussions
[GHC] #13989: use templateHaskell type checker panic
by GHC 17 Jul '17

17 Jul '17
#13989: use templateHaskell type checker panic -------------------------------------+------------------------------------- Reporter: chinaxing | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I'm use acid-state, whci use TemplateHaskell to deriveSafeCopy, the following code will produce a panic {{{#!hs {-# LANGUAGE TemplateHaskell #-} module Service.HAEventBroker where -- this module dispatch HAEvent to remote RDS-Console, -- if failed, persistent to locle storage and deliver later -- Event must keep ordered, aka FIFO -- import Model import Data.Acid import qualified Data.List as DL import Data.SafeCopy import Data.Typeable import Control.Concurrent import Control.Monad data HAEvent = HAEvent Int data EventQueue = EvQ [HAEvent] $(deriveSafeCopy 0 'base ''EventQueue) putEvent :: HAEvent -> Update EventQueue () putEvent e = do EvQ el <- get put $ EvQ (e:el) pollEvent :: Int -> Update EventQueue [HAEvent] pollEvent n = do EvQ el <- get let rl = DL.reverse el let t = DL.take n $ rl let r = DL.reverse $ DL.splitAt (length t) rl put $ EvQ r $(makeAcidic 'EventQueue ['putEvent, 'pollEvent]) publish :: Broker -> HAEvent -> IO () publish broker e = update broker (PutEvent e) consume :: HAEvent -> IO () consume e = return () newtype Broker = Broker { acidState :: AcidState (EventQueue [HAEvent]) } runBroker :: IO Broker runBroker = do broker <- openLocalStateFrom "haBroker/" (EventQueue []) putStrLn "I'm consuming the message queue ..." forkIO $ forever $ doConsume broker return broker where doConsume :: Broker -> IO () doConsume b = do ev <- update (acidState b) (PollEvent n) consume ev }}} stack ghci --ghc-options=-ddump-splices {{{#!hs /Users/LambdaCat/code/haskell/ha- admin/src/Service/HAEventBroker.hs:21:3-37: Splicing declarations deriveSafeCopy 0 'base ''EventQueue ======> instance SafeCopy EventQueue where putCopy (EvQ a1_awJ6) = contain (do { safePut_ListHAEvent_awJ7 <- getSafePut; safePut_ListHAEvent_awJ7 a1_awJ6; return () }) getCopy = contain (cereal-0.5.4.0:Data.Serialize.Get.label "Service.HAEventBroker.EventQueue:" (do { safeGet_ListHAEvent_awJ8 <- getSafeGet; ((return EvQ) <*> safeGet_ListHAEvent_awJ8) })) version = 0 kind = base errorTypeName _ = "Service.HAEventBroker.EventQueue" ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-apple-darwin): initTc: unsolved constraints WC {wc_insol = [W] get_awNI :: t_awNH[tau:1] (CHoleCan: get) [W] put_awOs :: t_awOr[tau:1] (CHoleCan: put) [W] get_awOF :: t_awOE[tau:1] (CHoleCan: get) [W] put_awOK :: t_awOJ[tau:1] (CHoleCan: put)} Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13989> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
Re: [GHC] #1399: better support for developing threaded applications in ghci
by GHC 14 Jul '17

14 Jul '17
#1399: better support for developing threaded applications in ghci -------------------------------------+------------------------------------- Reporter: guest | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: ⊥ Component: GHCi | Version: 6.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mentheta): * cc: claus.reinke@… (removed) * cc: claus.reinke@…, Bulat.Ziganshin@…, mentheta (added) * failure: => None/Unknown -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1399#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
[GHC] #13976: Defined but not used warning on records used by servant-client
by GHC 14 Jul '17

14 Jul '17
#13976: Defined but not used warning on records used by servant-client -------------------------------------+------------------------------------- Reporter: matthewleon | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When generating an HTTP client through the servant-client lib (https://hackage.haskell.org/package/servant-client) if the various API record accessors go unused elsewhere, -Wunused-top-binds will generate warnings of the style "Defined but not used: `{accessor}`. I believe this is somewhat misleading, as the accessors are indeed "used" in the process of generating the client. Some sample code that will generate a warning for the `release` accessor: {{{ type API = "release" :> Capture "mbid" Mbid :> Get '[JSON] Listing type Mbid = UUID data Listing = Listing { release :: Text } deriving (Show, Generic) instance FromJSON Listing coverArtArchiveAPI :: Proxy API coverArtArchiveAPI = Proxy getListing :: Mbid -> ClientM Listing getListing = client coverArtArchiveAPI }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13976> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 1
0 0
[GHC] #13975: GHC can't infer pattern signature, untoucable kinds
by GHC 14 Jul '17

14 Jul '17
#13975: GHC can't infer pattern signature, untoucable kinds -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# Language TypeFamilyDependencies, TypeInType, KindSignatures, PolyKinds, PatternSynonyms, GADTs #-} import Data.Kind data T = D | I type SING k = k -> Type type family Sing = (r :: SING k) | r -> k where Sing = ST Sing = SPair data ST :: SING T where SD :: ST D SI :: ST I data SPair :: SING (k, k') where SPair :: Sing a -> Sing b -> SPair '(a, b) pattern DD :: SPair '(D, D) pattern DD = SPair SD SD }}} works.. until we remove the pattern signature for `DD`, then we get {{{ $ ghci-8.0.1 -ignore-dot-ghci /tmp/aur.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /tmp/aur.hs, interpreted ) /tmp/aur.hs:21:20: error: • Couldn't match kind ‘k’ with ‘T’ ‘k’ is untouchable inside the constraints: t ~ '(a, b) bound by a pattern with constructor: SPair :: forall k k' (a :: k) (b :: k'). Sing a -> Sing b -> SPair '(a, b), in a pattern synonym declaration at /tmp/aur.hs:21:14-24 ‘k’ is a rigid type variable bound by the inferred type of DD :: SPair t at /tmp/aur.hs:21:9 Possible fix: add a type signature for ‘DD’ When matching the kind of ‘a’ Expected type: Sing a Actual type: ST a • In the pattern: SD In the pattern: SPair SD SD In the declaration for pattern synonym ‘DD’ /tmp/aur.hs:21:23: error: • Couldn't match kind ‘k'’ with ‘T’ ‘k'’ is untouchable inside the constraints: a ~ 'D bound by a pattern with constructor: SD :: ST 'D, in a pattern synonym declaration at /tmp/aur.hs:21:20-21 ‘k'’ is a rigid type variable bound by the inferred type of DD :: SPair t at /tmp/aur.hs:21:9 Possible fix: add a type signature for ‘DD’ When matching the kind of ‘b’ Expected type: Sing b Actual type: ST b • In the pattern: SD In the pattern: SPair SD SD In the declaration for pattern synonym ‘DD’ Failed, modules loaded: none. }}} Restricting the kind of `SPair` to `SPair :: SING (T, T)` gets it to work, can it be made to work bidirectionally? Or can it only work unidirectionally {{{#!hs pattern DD :: () => (a ~ D, b ~ D, res ~ '(a, b)) => SPair res pattern DD <- SPair SD SD }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13975> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
[GHC] #13973: NamedFieldPuns fails for qualified imports if field name is already in scope
by GHC 13 Jul '17

13 Jul '17
#13973: NamedFieldPuns fails for qualified imports if field name is already in scope -------------------------------------+------------------------------------- Reporter: sergv | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Hi, I get following error on the program below {{{ Package has never been configured. Configuring with default flags. If this fails, please run configure manually. Resolving dependencies... Configuring test-0.1.0.0... Building test-0.1.0.0... Preprocessing library test-0.1.0.0... [1 of 2] Compiling Record ( Record.hs, dist/build/Record.o ) [2 of 2] Compiling Test ( Test.hs, dist/build/Test.o ) <no location info>: error: ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): translateConPatVec: lookup Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} The cabal project: {{{ name: test version: 0.1.0.0 cabal-version: >= 1.16 build-type: Simple library exposed-modules: Record Test default-language: Haskell98 build-depends: base >= 4.7 }}} The module `Record.hs`: {{{#!hs module Record (Record(..)) where data Record = Record { field1 :: Int, field2 :: Int } }}} The main module `Test.hs`: {{{#!hs {-# LANGUAGE NamedFieldPuns #-} module Test (foo) where import qualified Record as Rec -- The culprit field2 :: () field2 = () foo :: Rec.Record -> Int foo Rec.Record{Rec.field1, field2} = field1 + field2 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13973> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 3
0 0
Re: [GHC] #12913: Port SplitSections to Windows
by GHC 13 Jul '17

13 Jul '17
#12913: Port SplitSections to Windows -------------------------------------+------------------------------------- Reporter: olsner | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 (Linking) | Resolution: | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #8405 #13939 | Differential Rev(s): Phab:D3382 Wiki Page: | Phab:D3383 Phab:D3523 -------------------------------------+------------------------------------- Changes (by Phyx-): * status: closed => new * resolution: fixed => Comment: Need to investigate using lld instead. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12913#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
Re: [GHC] #12913: Port SplitSections to Windows
by GHC 13 Jul '17

13 Jul '17
#12913: Port SplitSections to Windows -------------------------------------+------------------------------------- Reporter: olsner | Owner: (none) Type: task | Status: closed Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.0.1 (Linking) | Resolution: fixed | Keywords: Operating System: Windows | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #8405 #13939 | Differential Rev(s): Phab:D3382 Wiki Page: | Phab:D3383 Phab:D3523 -------------------------------------+------------------------------------- Comment (by Tamar Christina <tamar@…>): In [changeset:"f656fba19d0cefe05643ddea35d080ea332a6584/ghc" f656fba1/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="f656fba19d0cefe05643ddea35d080ea332a6584" [skip ci] Temporarily disable split-sections on Windows. Summary: This temporarily disabled split-sections again on Windows because of the overhead in linking it introduces. Unfortunately because BFD is so slow a testsuite run gets almost 2x slower. Simply linking Hello World takes an unacceptable long time. So for now, it'll be disabled as we look into different linkers such as LLD. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12913 Differential Revision: https://phabricator.haskell.org/D3731 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12913#comment:15> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 0
0 0
[GHC] #13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable
by GHC 13 Jul '17

13 Jul '17
#13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: Incorrect Unknown/Multiple | error/warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I only have access to an older version (GHC 8.0.1), this may have been fixed. If I define {{{#!hs {-# language PatternSynonyms #-} pattern R{aaa} = uuu }}} it complains about a recursive pattern synonym {{{ $ ghci-8.0.1 -ignore-dot-ghci /tmp/tmp.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /tmp/tmp.hs, interpreted ) /tmp/tmp.hs:1:1: error: Recursive pattern synonym definition with following bindings: R (defined at /tmp/tmp.hs:3:1-22) Failed, modules loaded: none. Prelude> }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13969> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 2
0 0
[GHC] #13311: Audit shady uses of tcSplitSigmaTy
by GHC 12 Jul '17

12 Jul '17
#13311: Audit shady uses of tcSplitSigmaTy -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.4.1 Component: Compiler | Version: 8.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When fixing #12918, I ended up needing to introduce a helper function called `tcSplitNestedSigmaTys`, which is quite similar to `tcSplitSigmaTy`, except that it attempts to look through as many nested `forall`s as possible. (See the documentation for `tcSplitNestedSigmaTys` [http://git.haskell.org/ghc.git/blob/611f998fd545b45167170d9e60b7d9147178f0a… here]). In the process, I accidentally discovered a bug! First, consider this program: {{{#!hs {-# LANGUAGE RankNTypes #-} module Bug where class C a where op :: forall b c. (Monoid b, Monoid c, Eq a) => a -> b -> c }}} This should be (and is) rejected, since we're trying to constrain `a` with `Eq` in `op`, but we don't have `-XConstraintedClassMethods` enabled. But what about this equivalent program? {{{#!hs {-# LANGUAGE RankNTypes #-} module Bug where class C a where op :: forall b. Monoid b => forall c. Monoid c => Eq a => a -> b -> c }}} By the same logic, this should also be rejected. But in GHC 8.0.2, it wasn't! That's because we were checking for the presence of constrained class variables using `tcSplitSigmaTy`, which only gives you `Monoid b` as the constraint, totally ignoring the bogus constraint inside of `forall c. Monoid c => Eq a => a -> b -> c`. When I fixed #12918 (a seemingly unrelated task), I ended up replacing that very use of `tcSplitSigmaTy` with `tcSplitNestedSigmaTys`. Now it gives you `(Monoid b, Monoid c, Eq a)` as expected when checking the constraints, and the second program is now rightly rejected on GHC HEAD. But I fear that there may be many more bogus uses of `tcSplitSigmaTy`. I should go through and try flushing out bugs of a similar caliber, and see if subbing in `tcSplitNestedSigmaTys` fixes these bugs. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13311> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 8
0 0
[GHC] #13961: TH.reify can be ambiguous when giving a name that's in multiple namespaces
by GHC 12 Jul '17

12 Jul '17
#13961: TH.reify can be ambiguous when giving a name that's in multiple namespaces -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Template | Version: 8.0.1 Haskell | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- What should this program do? {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} module Bug where import Language.Haskell.TH (***) :: Bool -> Bool -> Bool (***) _ _ = True type (***) a b = Bool $(return []) main :: IO () main = putStrLn $(reify (mkName "***") >>= stringE . show) }}} The issue is that `reify (mkName "***")` could conceivable look up the `Info` of two different things: the value-level `(***)` or the type-level `(***)`. In this case, it happens to pick the value-level one: {{{ $ /opt/ghc/8.2.1/bin/runghc Bug.hs VarI Bug.*** (AppT (AppT ArrowT (ConT GHC.Types.Bool)) (AppT (AppT ArrowT (ConT GHC.Types.Bool)) (ConT GHC.Types.Bool))) Nothing }}} So if you want to look up the type-level `(***)`'s info in this way, you're hosed. If the above scenario seems contrived, and you find yourself thinking "but RyanGlScott, why don't you just use `'(***)` and `''(***)`?", keep in mind that there are times I need to look up //unqualified// names, and in those situations, `mkName` is all I have at my disposal for creating the `Name` to look up. There has to be a better way to go about business here. Perhaps we should introduce another function {{{#!hs reifyAll :: Name -> [Info] }}} That finds all possible `Info`s in all the namespaces the argument `Name` can be found in? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13961> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
1 1
0 0
  • ← Newer
  • 1
  • ...
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • ...
  • 111
  • Older →

HyperKitty Powered by HyperKitty version 1.3.9.