[GHC] #10880: The 'impossible' happend

GHC ghc-devs at haskell.org
Mon Sep 14 10:12:54 UTC 2015


#10880: The 'impossible' happend
-----------------------------------+---------------------------------------
              Reporter:  drever    |             Owner:
                  Type:  bug       |            Status:  new
              Priority:  normal    |         Milestone:
             Component:  Compiler  |           Version:  7.6.3
              Keywords:            |  Operating System:  MacOS X
          Architecture:  ia64      |   Type of failure:  Compile-time crash
             Test Case:            |        Blocked By:
              Blocking:            |   Related Tickets:
Differential Revisions:            |
-----------------------------------+---------------------------------------
 The compiler told me to file this report. I hope this helps!

 {{{
 drever$ cabal build
 Building xxx-0.0...
 Preprocessing library xxx-0.0...
 In-place registering xxx-0.0...
 Preprocessing executable 'xxx' for xxx-0.0...
 [21 of 21] Compiling Main             ( src/main.hs, dist/build/xxx/xxx-
 tmp/Main.o )

 src/main.hs:107:19:
     Couldn't match kind `* -> *' with `*'
     Expected type: FileName -> ReaderT XXXEnvironment IO t0
       Actual type: FileName -> ReaderT XXXEnvironment IO t0
     Kind incompatibility when matching types:
       FileName :: * -> *
       FileName :: *
     The function `lift'ghc: panic! (the 'impossible' happened)
   (GHC version 7.6.3 for x86_64-apple-darwin):
         kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 {{{#!hs
 generatecode :: (Entity -> [EntitySample]) -> ReaderT MyEnvironment IO ()
 generatecode  sample = do
     domain_xsd <- lift xsdEntities "test"
     return ()
 }}}

 {{{#!hs
 xsdEntities :: String -> IO [Entity]
 xsdEntities f = do
     maybeEntities <- runX ((XS.gettypes f) BaseWrite)
     return $ catMaybes $ concat maybeEntities
 }}}

 {{{#!hs
 gettypes :: String -> MyType -> IOSLA (XIOState s) a [Maybe S.Entity]
 gettypes f t = (cris f) >>>
     (arr $ filterExtends BaseWrite) >>>
     (arr getComplexTypes) >>>
     (arr (map complexTypeToEntity))
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10880>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list