
#10097: GHC 7.11 errors on dictionary casting tricks -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- I am not saying this is a bug, it just seems to mess with techniques that assume white-box knowledge of GHC's dictionary-passing internals. So, I have this function (in the `gdiff` fork I am fooling around with): {{{ iFeelDirty :: (forall ts . List f ts => f t ts -> Con f t) -> (forall ts . IsList f ts -> f t ts -> Con f t) iFeelDirty = unsafeCoerce }}} It compiles perfectly before 7.11, but now I get: {{{ src/Data/Generic/Diff/Effectful.hs:139:14: No instance for (List f ts3) The type variable `ts3' is ambiguous Relevant bindings include iFeelDirty :: (forall ts. List f ts => f t ts -> Con f t) -> forall ts. IsList f ts -> f t ts -> Con f t (bound at src/Data/Generic/Diff/Effectful.hs:139:1) In the expression: unsafeCoerce In an equation for `iFeelDirty': iFeelDirty = unsafeCoerce }}} For reference, this is the file I am looking at: https://github.com/ggreif/gdiff/blob/97b13e2dca0c35c2c53d5430f6f0700dc89938e... Looks like the old trick (also used by ekmett's `reflection` lib?) fails to deliver. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10097 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler