[GHC] #12476: Error building HList

#12476: Error building HList -------------------------------------+------------------------------------- Reporter: | Owner: DanielWaterworth | 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: -------------------------------------+------------------------------------- {{{ [21 of 28] Compiling Data.HList.Labelable ( Data/HList/Labelable.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Data/HList/Labelable.o ) /home/dan/fun/HList/Data/HList/Labelable.hs:137:9: warning: [-Wredundant- constraints] • Redundant constraints: (LabeledOpticF ty f, LabeledOpticP ty p) • In the type signature for: hLens' :: (ty ~ LabelableTy LabeledR, LabeledOpticF ty f, LabeledOpticP ty p, LabeledOpticTo ty x to) => Label x -> to (p a (f b)) (p (LabeledR s) (f (LabeledR t))) In the instance declaration for ‘Labelable x LabeledR s t a b’ /home/dan/fun/HList/Data/HList/Labelable.hs:211:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (a b c) x • In the instance declaration for ‘EnsureLabel (a b c) (Label x)’ /home/dan/fun/HList/Data/HList/Labelable.hs:277:10: warning: [-Wredundant- constraints] • Redundant constraint: HRLabelSet bs • In the instance declaration for ‘Projected Record s t a b’ /home/dan/fun/HList/Data/HList/Labelable.hs:332:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy '[])’ /home/dan/fun/HList/Data/HList/Labelable.hs:337:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy (x : xs))’ /home/dan/fun/HList/Data/HList/Labelable.hs:344:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy (Lbl n ns desc : xs))’ ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): pprIfaceCo Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This is the version I was building: https://github.com/DanielWaterworth/HList/tree/66643fb75771e71192ab380e4f2ed... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12476 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12476: Error building HList -------------------------------------+------------------------------------- Reporter: DanielWaterworth | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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: | -------------------------------------+------------------------------------- Description changed by DanielWaterworth: @@ -51,0 +51,2 @@ + + This may be a duplicate of https://ghc.haskell.org/trac/ghc/ticket/12242 New description: {{{ [21 of 28] Compiling Data.HList.Labelable ( Data/HList/Labelable.hs, .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/Data/HList/Labelable.o ) /home/dan/fun/HList/Data/HList/Labelable.hs:137:9: warning: [-Wredundant- constraints] • Redundant constraints: (LabeledOpticF ty f, LabeledOpticP ty p) • In the type signature for: hLens' :: (ty ~ LabelableTy LabeledR, LabeledOpticF ty f, LabeledOpticP ty p, LabeledOpticTo ty x to) => Label x -> to (p a (f b)) (p (LabeledR s) (f (LabeledR t))) In the instance declaration for ‘Labelable x LabeledR s t a b’ /home/dan/fun/HList/Data/HList/Labelable.hs:211:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (a b c) x • In the instance declaration for ‘EnsureLabel (a b c) (Label x)’ /home/dan/fun/HList/Data/HList/Labelable.hs:277:10: warning: [-Wredundant- constraints] • Redundant constraint: HRLabelSet bs • In the instance declaration for ‘Projected Record s t a b’ /home/dan/fun/HList/Data/HList/Labelable.hs:332:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy '[])’ /home/dan/fun/HList/Data/HList/Labelable.hs:337:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy (x : xs))’ /home/dan/fun/HList/Data/HList/Labelable.hs:344:10: warning: [-Wredundant- constraints] • Redundant constraint: ToSym (to p q) x • In the instance declaration for ‘HExtend (to p q) (Proxy (Lbl n ns desc : xs))’ ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): pprIfaceCo Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} This is the version I was building: https://github.com/DanielWaterworth/HList/tree/66643fb75771e71192ab380e4f2ed... This may be a duplicate of https://ghc.haskell.org/trac/ghc/ticket/12242 -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12476#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12476: Error building HList -------------------------------------+------------------------------------- Reporter: DanielWaterworth | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.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 bgamari): * milestone: => 8.0.2 Comment: The fix for #12242 has been merged to `ghc-8.0` but I still need to check whether this is now fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12476#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12476: Error building HList -------------------------------------+------------------------------------- Reporter: DanielWaterworth | Owner: Type: bug | Status: infoneeded Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.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 bgamari): * status: new => infoneeded Comment: Well, this doesn't quite compile yet but then again it also doesn't compile with 7.10. DanielWaterworth, can you confirm that this is expected? {{{ Data/HList/Dredge.hs:78:27: error: • Ambiguous type variables ‘x1’, ‘k1’, ‘l1’ arising from a use of ‘dredge’ prevents the constraint ‘(EnsureLabel x1 (Label l1))’ from being solved. Relevant bindings include label :: x1 (bound at Data/HList/Dredge.hs:78:9) dredge' :: x1 -> p1 a1 (f1 a1) -> p1 s1 (f1 s1) (bound at Data/HList/Dredge.hs:78:1) Probable fix: use a type annotation to specify what ‘x1’, ‘k1’, ‘l1’ should be. These potential instances exist: instance forall k (x :: k). EnsureLabel (Label x) (Label x) -- Defined at Data/HList/Labelable.hs:204:10 instance forall k (x :: k). EnsureLabel (Proxy x) (Label x) -- Defined at Data/HList/Labelable.hs:207:10 ...plus one instance involving out-of-scope types (use -fprint-potential-instances to see them all) • In the first argument of ‘isSimple’, namely ‘(dredge label)’ In the expression: isSimple (dredge label) In an equation for ‘dredge'’: dredge' label = isSimple (dredge label) Data/HList/Dredge.hs:90:29: error: • Ambiguous type variables ‘x0’, ‘k0’, ‘l0’ arising from a use of ‘dredgeND’ prevents the constraint ‘(EnsureLabel x0 (Label l0))’ from being solved. Relevant bindings include label :: x0 (bound at Data/HList/Dredge.hs:90:11) dredgeND' :: x0 -> p0 a0 (f0 a0) -> p0 s0 (f0 s0) (bound at Data/HList/Dredge.hs:90:1) Probable fix: use a type annotation to specify what ‘x0’, ‘k0’, ‘l0’ should be. These potential instances exist: instance forall k (x :: k). EnsureLabel (Label x) (Label x) -- Defined at Data/HList/Labelable.hs:204:10 instance forall k (x :: k). EnsureLabel (Proxy x) (Label x) -- Defined at Data/HList/Labelable.hs:207:10 ...plus one instance involving out-of-scope types (use -fprint-potential-instances to see them all) • In the first argument of ‘isSimple’, namely ‘(dredgeND label)’ In the expression: isSimple (dredgeND label) In an equation for ‘dredgeND'’: dredgeND' label = isSimple (dredgeND label) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12476#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12476: Error building HList -------------------------------------+------------------------------------- Reporter: DanielWaterworth | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | 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 DanielWaterworth): * status: infoneeded => closed * resolution: => fixed Comment: I'm not going to look at this any time soon, so no need to block on it. I'll reopen when/if I revisit it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12476#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC