packages feed

inline-c-cpp 0.3.0.0 → 0.3.0.1

raw patch · 3 files changed

+8/−5 lines, 3 files

Files

inline-c-cpp.cabal view
@@ -1,5 +1,5 @@ name:                inline-c-cpp-version:             0.3.0.0+version:             0.3.0.1 synopsis:            Lets you embed C++ code into Haskell. description:         Utilities to inline C++ code into Haskell using inline-c.  See                      tests for example on how to build.@@ -7,9 +7,9 @@ license-file:        LICENSE author:              Francesco Mazzoli maintainer:          francesco@fpcomplete.com-copyright:           (c) 2015-2016 FP Complete Corporation, (c) 2017 Francesco Mazzoli+copyright:           (c) 2015-2016 FP Complete Corporation, (c) 2017-2018 Francesco Mazzoli category:            FFI-tested-with:         GHC == 8.2.1+tested-with:         GHC == 8.2.2, GHC == 8.4.3, GHC == 8.6.1 build-type:          Simple cabal-version:       >=1.10 
src/Language/C/Inline/Cpp/Exceptions.hs view
@@ -101,7 +101,7 @@   --   -- the defined(__clang__) should actually be redundant, since apparently it also   -- defines GNUC, but but let's be safe.-  C.verbatim $ unlines+  _ <- C.verbatim $ unlines     [ "#if defined(__GNUC__) || defined(__clang__)"     , "#include <cxxabi.h>"     , "#include <string>"
test/tests.hs view
@@ -7,6 +7,7 @@ import qualified Language.C.Inline.Cpp as C import qualified Language.C.Inline.Cpp.Exceptions as C import qualified Test.Hspec as Hspec+import           Data.List (isInfixOf)  C.context C.cppCtx @@ -42,7 +43,9 @@         throw std::string("FOOBAR");         |] -      result `Hspec.shouldBe` Left (C.CppOtherException (Just "std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >"))+      case result of+        Left (C.CppOtherException (Just ty)) | "string" `isInfixOf` ty -> return ()+        _ -> error ("Expected Left CppOtherException with string type, but got " ++ show result)      Hspec.it "catch without return (pure)" $ do       result <- [C.tryBlock| void {