fixed

Pure Haskell large fixed-width integers and Montgomery arithmetic (docs.ppad.tech/fixed).
git clone git://git.ppad.tech/fixed.git
Log | Files | Refs | README | LICENSE

ppad-fixed.cabal (2540B)


      1 cabal-version:      3.0
      2 name:               ppad-fixed
      3 version:            0.2.1
      4 synopsis:           Large fixed-width words and constant-time arithmetic.
      5 license:            MIT
      6 license-file:       LICENSE
      7 author:             Jared Tobin
      8 maintainer:         jared@ppad.tech
      9 category:           Data
     10 build-type:         Simple
     11 tested-with:        GHC == { 9.10.3 }
     12 extra-doc-files:    CHANGELOG
     13 description:
     14   A pure high-performance implementation of large fixed-width integers
     15   and supporting constant-time operations, including Montgomery-form
     16   arithmetic on domains related to the the elliptic curve secp256k1.
     17 
     18 flag llvm
     19   description: Use GHC's LLVM backend.
     20   default:     False
     21   manual:      True
     22 
     23 source-repository head
     24   type:     git
     25   location: git.ppad.tech/fixed.git
     26 
     27 library
     28   default-language: Haskell2010
     29   hs-source-dirs:   lib
     30   ghc-options:
     31       -Wall
     32   if flag(llvm)
     33     ghc-options: -fllvm -O2
     34   -- LLVM's x86 backend rewrites a cmov whose operand is a load as a
     35   -- branch (its cmov converter), which makes sub_mod#'s borrow-masked
     36   -- correction a branch on the borrow; keep the cmov.
     37   if flag(llvm) && arch(x86_64)
     38     ghc-options: -optlc=-x86-cmov-converter=false
     39   exposed-modules:
     40       Data.Choice
     41     , Data.Word.Limb
     42     , Data.Word.Wide
     43     , Data.Word.Wider
     44     , Numeric.Montgomery.Secp256k1.Curve
     45     , Numeric.Montgomery.Secp256k1.Scalar
     46   build-depends:
     47       base >= 4.9 && < 5
     48     , deepseq >= 1.5 && < 1.6
     49 
     50 test-suite fixed-tests
     51   type:                exitcode-stdio-1.0
     52   default-language:    Haskell2010
     53   hs-source-dirs:      test
     54   main-is:             Main.hs
     55   other-modules:
     56       Limb
     57       Wide
     58       Wider
     59       Montgomery.Curve
     60       Montgomery.Scalar
     61 
     62   ghc-options:
     63     -rtsopts -Wall -O2
     64   if flag(llvm)
     65     ghc-options: -fllvm
     66 
     67   build-depends:
     68       base
     69     , ppad-fixed
     70     , tasty
     71     , tasty-hunit
     72     , tasty-quickcheck
     73 
     74 benchmark fixed-bench
     75   type:                exitcode-stdio-1.0
     76   default-language:    Haskell2010
     77   hs-source-dirs:      bench
     78   main-is:             Main.hs
     79 
     80   ghc-options:
     81     -rtsopts -O2 -Wall -fno-warn-orphans
     82   if flag(llvm)
     83     ghc-options: -fllvm
     84 
     85   build-depends:
     86       base
     87     , criterion
     88     , ppad-fixed
     89 
     90 benchmark fixed-weigh
     91   type:                exitcode-stdio-1.0
     92   default-language:    Haskell2010
     93   hs-source-dirs:      bench
     94   main-is:             Weight.hs
     95 
     96   ghc-options:
     97     -rtsopts -O2 -Wall -fno-warn-orphans
     98   if flag(llvm)
     99     ghc-options: -fllvm
    100 
    101   build-depends:
    102       base
    103     , deepseq
    104     , ppad-fixed
    105     , weigh
    106