name: lol-cpp -- The package version. See the Haskell package versioning policy (PVP) -- for standards guiding when and how versions should be incremented. -- http://www.haskell.org/haskellwiki/Package_versioning_policy -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change version: 0.0.0.3 synopsis: A fast C++ backend for . homepage: https://github.com/cpeikert/Lol Bug-Reports: https://github.com/cpeikert/Lol/issues license: GPL-2 license-file: LICENSE author: Eric Crockett , Chris Peikert maintainer: Eric Crockett copyright: Eric Crockett, Chris Peikert category: Crypto stability: experimental build-type: Simple extra-source-files: README, CHANGES.md, Crypto/Lol/Cyclotomic/Tensor/CPP/*.h, Crypto/Lol/Cyclotomic/Tensor/CPP/*.cpp cabal-version: >= 1.10 description: Λ ∘ λ (Lol) is a general-purpose library for ring-based lattice cryptography. This package provides a C++ implementation of Lol's Tensor interface. source-repository head type: git location: https://github.com/cpeikert/Lol -- For information on compiling C with cabal: http://blog.ezyang.com/2010/06/setting-up-cabal-the-ffi-and-c2hs/ Flag llvm Description: Compile via LLVM. This produces much better object code, but you need to have the LLVM compiler installed. -- If you enable this and get errors like "Error: can't resolve `.rodata' {.rodata section}" -- then GHC doesn't like your version of LLVM! Default: False Flag opt Description: Turn on library optimizations Default: True library default-language: Haskell2010 ghc-options: -fwarn-dodgy-imports cc-options: -std=c++11 Include-dirs: Crypto/Lol/Cyclotomic/Tensor/CPP -- Due to #12152, the file containing the definition of `Zq::q` must be linked first, -- otherwise dynamic linking (`cabal repl` or `stack ghci`) results in the error: -- "Loading temp shared object failed: /tmp/ghc54651_0/libghc_1.so: undefined symbol _ZN2Zq1qE" -- For `cabal repl`, we can simply reorder the list so that the file that should be linked -- first comes first in the list. However `stack ghci` always links alphabetically, -- so we really just have to define `Zq::q` in the first file alphabetically. C-sources: Crypto/Lol/Cyclotomic/Tensor/CPP/common.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/crt.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/g.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/l.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/mul.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/norm.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/random.cpp, Crypto/Lol/Cyclotomic/Tensor/CPP/zq.cpp if flag(llvm) ghc-options: -fllvm -optlo-O3 -- ghc optimizations if flag(opt) -- makes lift much faster! ghc-options: -funfolding-use-threshold1000 exposed-modules: Crypto.Lol.Cyclotomic.Tensor.CPP other-modules: Crypto.Lol.Cyclotomic.Tensor.CPP.Backend Crypto.Lol.Cyclotomic.Tensor.CPP.Extension Crypto.Lol.Cyclotomic.Tensor.CPP.Instances build-depends: base >= 4.9 && < 5, constraints < 0.10, deepseq >= 1.4.1.1 && < 1.5, lol >= 0.6.0.0 && < 0.7, MonadRandom >= 0.2 && < 0.6, mtl >= 2.2.1 && < 2.3, numeric-prelude >= 0.4.2 && < 0.5, reflection >= 1.5.1 && < 2.2, vector>=0.11 && < 0.13 other-extensions: TemplateHaskell Benchmark bench-lol-cpp type: exitcode-stdio-1.0 default-language: Haskell2010 main-is: BenchCPPMain.hs ghc-options: -main-is BenchCPPMain hs-source-dirs: benchmarks ghc-options: -O2 -funfolding-creation-threshold=15000 -funfolding-use-threshold=1000 build-depends: base >= 4.9 && < 5, DRBG < 0.6, lol >= 0.6.0.0 && < 0.7, lol-benches >= 0.0.0.3 && < 0.1, lol-cpp test-suite test-lol-cpp type: exitcode-stdio-1.0 default-language: Haskell2010 main-is: TestCPPMain.hs ghc-options: -main-is TestCPPMain hs-source-dirs: tests ghc-options: -threaded -O2 build-depends: base >= 4.9 && < 5, lol-cpp, lol-tests < 0.1