
#13610: Unhelpful error messages about lifted and unlifted types -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 8.1 checker) | 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 nomeata): * priority: normal => low Comment: I am not sure if printing type prefixes would have improved manners. What would it say? Maybe {{{ Expected type: (#,#) VoidRep LiftedRep (State# RealWorld) (Weak# ()) Actual type: (#,#) VoidRep PrimRep (State# RealWorld) (Weak# ()) }}} But the “actual type” is not well-kinded; it cannot really be the “actual type” of anything. So it seems that something went wrong earlier during type inference? I guess something along these lines would have been more helpful: {{{ WeakDouble.hs:8:15: error: • Couldn't match a lifted type with an unlifted type Expected type representation: LiftedRep Actual type representation: PrimRep • In the second element of the unlifted tuple • In the type of the expression: mkWeakNoFinalizer# double () s }}} Anyways; this was not triggered by writing real code, so I’ll lower the priority. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13610#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler