Skip to content

Commit

Permalink
Restore flags to manual
Browse files Browse the repository at this point in the history
  • Loading branch information
chreekat committed Aug 31, 2023
1 parent b56356c commit fd03e49
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fd03e49

Please sign in to comment.