hoppy-generator 0.3.4 → 0.4.0
raw patch · 16 files changed
+29/−26 lines, 16 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Setup.hs +1/−1
- hoppy-generator.cabal +2/−2
- src/Foreign/Hoppy/Generator/Common.hs +1/−1
- src/Foreign/Hoppy/Generator/Common/Consume.hs +1/−1
- src/Foreign/Hoppy/Generator/Language/Cpp.hs +1/−1
- src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs +13/−10
- src/Foreign/Hoppy/Generator/Language/Haskell.hs +1/−1
- src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot +1/−1
- src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs +1/−1
- src/Foreign/Hoppy/Generator/Main.hs +1/−1
- src/Foreign/Hoppy/Generator/Spec.hs +1/−1
- src/Foreign/Hoppy/Generator/Spec/Base.hs +1/−1
- src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs +1/−1
- src/Foreign/Hoppy/Generator/Spec/Conversion.hs +1/−1
- src/Foreign/Hoppy/Generator/Types.hs +1/−1
- src/Foreign/Hoppy/Generator/Version.hs +1/−1
Setup.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
hoppy-generator.cabal view
@@ -1,12 +1,12 @@ name: hoppy-generator-version: 0.3.4+version: 0.4.0 synopsis: C++ FFI generator - Code generator homepage: http://khumba.net/projects/hoppy license: AGPL-3 license-file: LICENSE author: Bryan Gardiner <bog@khumba.net> maintainer: Bryan Gardiner <bog@khumba.net>-copyright: Copyright 2015-2017 Bryan Gardiner+copyright: Copyright 2015-2018 Bryan Gardiner category: Foreign build-type: Simple cabal-version: >=1.10
src/Foreign/Hoppy/Generator/Common.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Common/Consume.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Language/Cpp.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Language/Cpp/Internal.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by@@ -177,7 +177,7 @@ ExportClass cls -> when sayBody $ do let clsPtr = ptrT $ objT cls- justClsPtr = Just clsPtr+ constClsPtr = ptrT $ constT $ objT cls -- TODO Is this redundant for a completely empty class? (No ctors or methods, private dtor.) addReqsM $ classReqs cls -- This is needed at least for the delete function. @@ -195,7 +195,7 @@ when (classDtorIsPublic cls) $ sayFunction (classDeleteFnCppName cls) ["self"]- (fnT [ptrT $ constT $ objT cls] voidT) $+ (fnT [constClsPtr] voidT) $ Just $ say "delete self;\n" -- Export each of the class's variables.@@ -203,12 +203,15 @@ -- Export each of the class's methods. forM_ (classMethods cls) $ \method -> do- let nonMemberCall =- methodStatic method == Static ||- case methodImpl method of- RealMethod {} -> False- FnMethod {} -> True- let static = methodStatic method == Static+ let static = case methodStatic method of+ Static -> True+ Nonstatic -> False+ thisType = case methodConst method of+ Const -> constClsPtr+ Nonconst -> clsPtr+ nonMemberCall = static || case methodImpl method of+ RealMethod {} -> False+ FnMethod {} -> True sayExportFn (classEntityExtName cls method) (case methodImpl method of RealMethod name -> case name of@@ -221,7 +224,7 @@ FnMethod name -> case name of FnName cName -> CallFn $ sayIdentifier cName FnOp op -> CallOp op)- (if nonMemberCall then Nothing else justClsPtr)+ (if nonMemberCall then Nothing else Just thisType) (methodParams method) (methodReturn method) (methodExceptionHandlers method)
src/Foreign/Hoppy/Generator/Language/Haskell.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Language/Haskell.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Language/Haskell/Internal.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Main.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Spec.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2016-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Spec/Base.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Spec/ClassFeature.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Spec/Conversion.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Types.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2016-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by
src/Foreign/Hoppy/Generator/Version.hs view
@@ -1,6 +1,6 @@ -- This file is part of Hoppy. ----- Copyright 2015-2017 Bryan Gardiner <bog@khumba.net>+-- Copyright 2015-2018 Bryan Gardiner <bog@khumba.net> -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Affero General Public License as published by