The 'impossible' happend
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
generatecode :: (Entity -> [EntitySample]) -> ReaderT MyEnvironment IO ()
generatecode sample = do
domain_xsd <- lift xsdEntities "test"
xsdEntities :: String -> IO [Entity]
xsdEntities f = do
maybeEntities <- runX ((XS.gettypes f) BaseWrite)
return $ catMaybes $ concat maybeEntities
gettypes :: String -> MyType -> IOSLA (XIOState s) a [Maybe S.Entity]
gettypes f t = (cris f) >>>
(arr $ filterExtends BaseWrite) >>>
(arr getComplexTypes) >>>
(arr (map complexTypeToEntity))