Why doesn't this compile?

be = $( (1::CChar) /= (unsafePerformIO
                      $ with (1::CInt)
                      $ peekByteOff `flip` 0) ) :: Bool

Endian.hs:10:8:
    Couldn't match `Language.Haskell.TH.Lib.ExpQ' against `Bool'
      Expected type: Language.Haskell.TH.Lib.ExpQ
      Inferred type: Bool
    In the expression:
        (1 :: CChar)
/= (unsafePerformIO $ ((with (1 :: CInt)) $ (peekByteOff `flip` 0)))
    In the expression:
          $[splice]((1 :: CChar)
/= (unsafePerformIO $ ((with (1 :: CInt)) $ (peekByteOff `flip` 0)))) ::
            Bool

    Thanks, Joel

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to