Skip to content

Commit c86e2b1

Browse files
committed
update various metadata
1 parent 98d24f3 commit c86e2b1

File tree

5 files changed

+17
-43
lines changed

5 files changed

+17
-43
lines changed

inline-c-cpp/inline-c-cpp.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: inline-c-cpp
2-
version: 0.2.0.0
2+
version: 0.2.0.2
33
synopsis: Lets you embed C++ code into Haskell.
44
description: Utilities to inline C++ code into Haskell using inline-c. See
55
tests for example on how to build.
@@ -9,13 +9,13 @@ author: Francesco Mazzoli
99
maintainer: [email protected]
1010
copyright: (c) 2015-2016 FP Complete Corporation, (c) 2017 Francesco Mazzoli
1111
category: FFI
12-
tested-with: GHC == 7.8.4, GHC == 7.10.1
12+
tested-with: GHC == 8.2.1
1313
build-type: Simple
1414
cabal-version: >=1.10
1515

1616
source-repository head
1717
type: git
18-
location: https://github.com/fpco/inline-c-cpp
18+
location: https://github.com/fpco/inline-c
1919

2020
library
2121
exposed-modules: Language.C.Inline.Cpp

inline-c/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
- 0.6.0.2: Update haddock
2+
- 0.6.0.0: Use `addDependentFile` so separate compilation is not needed.
13
- 0.5.6.0: Add `ForeignPtr` anti-quoter
24
- 0.5.5.9: Make tests work with QuickCheck < 2.9
35
- 0.5.5.8: Add workaround for QuickCheck-2.9 bug. See issue #51

inline-c/inline-c.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: inline-c
2-
version: 0.6.0.0
2+
version: 0.6.0.2
33
synopsis: Write Haskell source files including C code inline. No FFI required.
44
description: See <https://github.com/fpco/inline-c/blob/master/README.md>.
55
license: MIT
@@ -8,7 +8,7 @@ author: Francesco Mazzoli, Mathieu Boespflug
88
maintainer: [email protected]
99
copyright: (c) 2015-2016 FP Complete Corporation, (c) 2017 Francesco Mazzoli
1010
category: FFI
11-
tested-with: GHC == 7.8.4, GHC == 7.10.1
11+
tested-with: GHC == 8.2.1
1212
build-type: Simple
1313
cabal-version: >=1.10
1414
Extra-Source-Files: README.md, changelog.md

inline-c/src/Language/C/Inline.hs

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
-- @
2020

2121
module Language.C.Inline
22-
( -- * Build process
22+
( -- * GHCi
2323
-- $building
2424

2525
-- * Contexts
@@ -81,41 +81,18 @@ import Language.C.Inline.FunPtr
8181

8282
-- $building
8383
--
84-
-- Each module that uses at least one of the TH functions in this module gets
85-
-- a C file associated to it, where the filename of said file will be the same
86-
-- as the module but with a `.c` extension. This C file must be built after the
87-
-- Haskell code and linked appropriately. If you use cabal, all you have to do
88-
-- is declare each associated C file in the @.cabal@ file.
89-
--
90-
-- For example:
84+
-- Currently @inline-c@ does not work in interpreted mode. However, GHCi
85+
-- can still be used using the @-fobject-code@ flag. For speed, we
86+
-- reccomend passing @-fobject-code -O0@, for example
9187
--
9288
-- @
93-
-- executable foo
94-
-- main-is: Main.hs, Foo.hs, Bar.hs
95-
-- hs-source-dirs: src
96-
-- -- Here the corresponding C sources must be listed for every module
97-
-- -- that uses C code. In this example, Main.hs and Bar.hs do, but
98-
-- -- Foo.hs does not.
99-
-- c-sources: src\/Main.c, src\/Bar.c
100-
-- -- These flags will be passed to the C compiler
101-
-- cc-options: -Wall -O2
102-
-- -- Libraries to link the code with.
103-
-- extra-libraries: -lm
104-
-- ...
89+
-- stack ghci --ghci-options='-fobject-code -O0'
10590
-- @
10691
--
107-
-- Note that currently @cabal repl@ is not supported, because the C code is not
108-
-- compiled and linked appropriately.
109-
--
110-
-- If we were to compile the above manually, we could:
92+
-- or
11193
--
11294
-- @
113-
-- $ ghc -c Main.hs
114-
-- $ cc -c Main.c -o Main_c.o
115-
-- $ ghc Foo.hs
116-
-- $ ghc Bar.hs
117-
-- $ cc -c Bar.c -o Bar_c.o
118-
-- $ ghc Main.o Foo.o Bar.o Main_c.o Bar_c.o -lm -o Main
95+
-- cabal repl --ghc-options='-fobject-code -O0'
11996
-- @
12097

12198
------------------------------------------------------------------------
@@ -237,7 +214,7 @@ import Language.C.Inline.FunPtr
237214
-- corresponding to the current Haskell file. Every inline C expression will result
238215
-- in a corresponding C function.
239216
-- For example, if we define @c_cos@
240-
-- as in the example above in @CCos.hs@, we will get a file @CCos.c@ containing
217+
-- as in the example above in @CCos.hs@, we will get a file containing
241218
--
242219
-- @
243220
-- #include <math.h>
@@ -250,12 +227,7 @@ import Language.C.Inline.FunPtr
250227
-- Every anti-quotation will correspond to an argument in the C function. If the same
251228
-- Haskell variable is anti-quoted twice, this will result in two arguments.
252229
--
253-
-- The C function is then invoked from Haskell with the correct arguments passed in.
254-
--
255-
-- == Known issues
256-
--
257-
-- * https://github.com/fpco/inline-c/issues/21
258-
-- * https://github.com/fpco/inline-c/issues/11
230+
-- The C function is then automatically compiled and invoked from Haskell with the correct arguments passed in.
259231

260232
-- | C expressions.
261233
exp :: TH.QuasiQuoter

sample-cabal-project/sample-cabal-project.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sample-cabal-project
22
version: 0.1.0.0
3-
license: AllRightsReserved
3+
license: MIT
44
license-file: LICENSE
55
author: Francesco Mazzoli
66
maintainer: [email protected]

0 commit comments

Comments
 (0)