
#15647: ghc: panic! (the 'impossible' happened) -------------------------------------+------------------------------------- Reporter: monomon | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Compile-time (amd64) | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ ghc: panic! (the 'impossible' happened) (GHC version 8.0.2 for x86_64-unknown-linux): initTc: unsolved constraints WC {wc_insol = [W] ask_an9K :: t_an9J[tau:1] (CHoleCan: ask) [W] put_an9Q :: t_an9P[tau:1] (CHoleCan: put)} }}} So this code derives an instance of the Decimal type incorrectly, but not sure if this is causing the error. I have some nested records, which contain a few Decimals. I am trying to make them acidic. {{{#!hs instance SafeCopy (DecimalRaw a) where putCopy (Decimal d) = contain $ safePut d getCopy = contain $ Decimal <$> safeGet deriveSafeCopy 0 'base ''Client deriveSafeCopy 0 'base ''Article deriveSafeCopy 0 'base ''ServerData makeLenses ''ServerData writeState :: String -> Update ServerData () writeState newValue = put (ServerData newValue) queryState :: Update ServerData String queryState = do ServerData string <- ask return string makeAcidic ''ServerData ['writeState 'queryState] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15647 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler