diff --git a/text.cabal b/text.cabal index 82ad1c37..45dc6464 100644 --- a/text.cabal +++ b/text.cabal @@ -76,16 +76,21 @@ flag developer flag simdutf description: use simdutf library, causes Data.Text.Internal.Validate.Simd to be exposed default: True + manual: True flag pure-haskell description: Don't use text's standard C routines When this flag is true, text will use pure Haskell variants of the routines. This is not recommended except for use with GHC's JavaScript backend. + + NB: This feature is not fully implemented. Several C routines are still in + use. default: False + manual: True library - if flag(pure-haskell) + if arch(javascript) || flag(pure-haskell) cpp-options: -DPURE_HASKELL c-sources: cbits/is_ascii.c cbits/measure_off.c @@ -98,7 +103,7 @@ library hs-source-dirs: src - if flag(simdutf) + if flag(simdutf) && !(arch(javascript) || flag(pure-haskell)) exposed-modules: Data.Text.Internal.Validate.Simd include-dirs: simdutf cxx-sources: simdutf/simdutf.cpp @@ -146,14 +151,6 @@ library if flag(simdutf) && os(netbsd) && impl(ghc < 9.4) build-depends: base < 0 - -- Naturally, pure-haskell precludes simdutf - if flag(pure-haskell) && flag(simdutf) - build-depends: base < 0 - - -- The JavaScript backend doesn't support C code - if arch(javascript) && flag(pure-haskell) - build-depends: base < 0 - exposed-modules: Data.Text Data.Text.Array