You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
install-includes field is only processed for the library target. And it doesn't work for foreign-library:
Minimal example:
foreign.cabal:
-- Initial foreign.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/name: foreign
version: 0.1.0.0synopsis: An example of the foreign library.
description: Foreign library example, this project is done as
a simple test of the foreign libraries inclusion.
license: BSD3
license-file: LICENSE
author: Alexander Vershilov
maintainer: [email protected]build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=2.0-- uncomment to fix an issue:--library-- build-depends: base >=4.9 && <4.10-- hs-source-dirs: src-- other-modules: Lib-- install-includes: Lib_stub.h -- default-language: Haskell2010
foreign-library mylib
type: native-shared
lib-version-info: 6:3:2
build-depends: base >=4.9&&<4.10hs-source-dirs: src
other-modules: Lib
install-includes: Lib_stub.h
other-extensions: ForeignFunctionInterface
default-language: Haskell2010
src/Lib.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Lib
( fac1
) where
foreign export ccall fac1 :: Int -> Int
fac1 :: Int -> Int
fac1 n = product [1..n]
install-includes
field is only processed for the library target. And it doesn't work forforeign-library
:Minimal example:
foreign.cabal:
src/Lib.hs
Relevant call in codebase:
cabal/Cabal/Distribution/Simple/Install.hs
Line 173 in 6814d87
The text was updated successfully, but these errors were encountered: