Opened 15 months ago

Closed 14 months ago

## #12476 closed bug (fixed)

# Error building HList

Reported by: | DanielWaterworth | Owned by: | |
---|---|---|---|

Priority: | normal | Milestone: | 8.0.2 |

Component: | Compiler | Version: | 8.0.1 |

Keywords: | Cc: | ||

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 (last modified by )

[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/66643fb75771e71192ab380e4f2ed56e37650f07

This may be a duplicate of https://ghc.haskell.org/trac/ghc/ticket/12242

### Change History (4)

### comment:1 Changed 15 months ago by

Description: | modified (diff) |
---|

### comment:2 Changed 14 months ago by

Milestone: | → 8.0.2 |
---|

### comment:3 Changed 14 months ago by

Status: | new → infoneeded |
---|

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)

### comment:4 Changed 14 months ago by

Resolution: | → fixed |
---|---|

Status: | infoneeded → closed |

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.

**Note:**See TracTickets for help on using tickets.

The fix for #12242 has been merged to

`ghc-8.0`

but I still need to check whether this is now fixed.