language-c99-simple 0.2.3 → 0.3.0
raw patch · 4 files changed
+10/−5 lines, 4 files
Files
- ChangeLog.md +5/−0
- language-c99-simple.cabal +2/−2
- src/Language/C99/Simple/AST.hs +1/−1
- src/Language/C99/Simple/Translate.hs +2/−2
ChangeLog.md view
@@ -1,5 +1,10 @@ # Revision history for language-c99-simple +## 0.3.0 -- 2024-01-03++* Use https instead of git:// for source url (thanks felixonmars) (#24).+* Extend FunDef with an optional StorageSpec. (thanks ivanperez-keera) (#23).+ ## 0.2.3 -- 2023-08-30 * Allow building with mtl-2.3.1 (thanks RyanGlScott) (#15).
language-c99-simple.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/ name: language-c99-simple-version: 0.2.3+version: 0.3.0 synopsis: C-like AST to simplify writing C99 programs. description: This package is a wrapper on top of 'language-c99'. It provides a simpler@@ -22,7 +22,7 @@ source-repository head type: git- location: git://github.com:fdedden/language-c99-simple.git+ location: https://github.com/fdedden/language-c99-simple.git library exposed-modules: Language.C99.Simple,
src/Language/C99/Simple/AST.hs view
@@ -17,7 +17,7 @@ data TransUnit = TransUnit [Decln] [FunDef] -data FunDef = FunDef Type Ident [Param] [Decln] [Stmt]+data FunDef = FunDef (Maybe StorageSpec) Type Ident [Param] [Decln] [Stmt] data Param = Param Type Ident
src/Language/C99/Simple/Translate.hs view
@@ -21,9 +21,9 @@ fundefs' = map (C.ExtFun . transfundef) fundefs transfundef :: FunDef -> C.FunDef-transfundef (FunDef ty name params decln ss) =+transfundef (FunDef storespec ty name params decln ss) = C.FunDef dspecs declr Nothing body where- dspecs = getdeclnspecs Nothing ty+ dspecs = getdeclnspecs storespec ty body = compound decln ss declr = execState (getdeclr ty) fundeclr fundeclr = C.Declr Nothing (fundirectdeclr name params)