An error occurred while compiling qtHaskell

After running qmake and mingw32-make from these instructions, and I run runhaskell Setup.hs build , I get the following error:

 [651 of 662] Compiling Qtc.Core.Attributes ( Qtc\Core\Attributes.hs, dist\build\Qtc\Core\Attributes.o ) Qtc\Core\Attributes.hs:584:13: Could not deduce (Qstt a (QDialogSc b)) arising from a use of `slotReject'' from the context (Qstt a (QDialogSc b1)) bound by the instance declaration at Qtc\Core\Attributes.hs:582:10-52 Possible fix: add (Qstt a (QDialogSc b)) to the context of the instance declaration or add an instance declaration for (Qstt a (QDialogSc b)) In the expression: slotReject' In an equation for `reject'': reject' = slotReject' In the instance declaration for `QsaSlotReject a' 

Attributes.hs file (line 578 - 583):

 class QsaSlotReject w where slotReject', reject' :: (Qslot w (w -> ()), (w -> ())) instance (Qstt a (QDialogSc b)) => QsaSlotReject (a) where slotReject' = (Qslot "reject()", \_ -> ()) reject' = slotReject' 

Wednesday:

  • Windows 7
  • Haskell Platform 2011.2.0
  • Qt sdk 4.7

btw, I have run out of memory twice, but I think it doesn’t matter.

+8
windows qt haskell
source share
1 answer

The problem is that

 data Qslot xf = Qslot String 

therefore, it’s a little difficult to understand what x and f can be from a given Qslot β€œBlah-blah” form element. There may be a subtle change in the GHC output mechanism as the latest version of qthaskell rose last fall.

In any case, it seems that compiling with some interesting warnings and examples works if you replace

  instance (Qstt a (QDialogSc b)) => QsaSlotReject (a) where slotReject' = (Qslot "reject()", \_ -> ()) reject' = slotReject' 

from

  instance (Qstt a (QDialogSc b)) => QsaSlotReject (a) where slotReject' = (Qslot "reject()", \_ -> ()) reject' = (Qslot "reject()", \_ -> ()) 

So ghc should not be surprised how much ...

There must be something that makes things more accurate. I do not know if this will reduce the warnings that begin to arise systematically later associated with this line.

+9
source share

All Articles