Haskell Text.Regex.Posix и Text.Regex.TDFA не работают в ghci - PullRequest
1 голос
/ 19 января 2020

Я использую Windows 10, GH C 8.6.5.

Я использовал cabal new-install как на Text.Regex.Posix и Text.Regex.TDFA, так и на кабальных выходах, которые он создал, и установил их.

Но ни один из этих модулей не мог быть загружен в ghci.

Теперь, когда я запускаю команды установки, я получаю это, когда я впервые получаю сообщения о сборке и установке пакетов.

Команда:
cabal new-install regex-posix --lib

Выход:

Resolving dependencies...
Up to date

Команда:
cabal new-install regex-tdfa --lib

Выход:

Resolving dependencies...
Up to date

Команда:
cabal info regex-posix

Выход:

* regex-posix      (library)
Synopsis:      POSIX Backend for "Text.Regex" (regex-base)
Versions available: 0.93.1, 0.93.2, 0.94.1, 0.94.2, 0.94.4, 0.95.0, 0.95.1,
                    0.95.2, 0.96.0.0 (and 9 others)
Versions installed: [ Not installed ]
Homepage:      [ Not specified ]
Bug reports:   https://github.com/hvr/regex-posix
Description:   The POSIX regex backend for
               <//hackage.haskell.org/package/regex-base regex-base>.

               The main appeal of this backend is that it's very lightweight
               due to its reliance on the ubiquitous
               <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/regex.h.html
               POSIX.2 regex> facility that is provided by the standard C
               library on most POSIX platforms.

               See also <https://wiki.haskell.org/Regular_expressions> for
               more information.
Category:      Text
License:       BSD3
Author:        Christopher Kuklewicz
Maintainer:    hvr@gnu.org
Source repo:   https://github.com/hvr/regex-posix.git
Flags:         _regex-posix-clib
Dependencies:  regex-base ==0.94.*, base >=4.3 && <4.14,
               containers >=0.4 && <0.7, bytestring >=0.9 && <0.11,
               array >=0.3 && <0.6, regex-posix-clib ==2.7.*, base <0,
               fail ==4.9.*
Cached:        Yes
Modules:
    Text.Regex.Posix
    Text.Regex.Posix.ByteString
    Text.Regex.Posix.ByteString.Lazy
    Text.Regex.Posix.Sequence
    Text.Regex.Posix.String
    Text.Regex.Posix.Wrap

Команда:
cabal info regex-tdfa

Выход:

* regex-tdfa       (library)
Synopsis:      Pure Haskell Tagged DFA Backend for "Text.Regex" (regex-base)
Versions available: 0.95.2, 0.97.3, 0.97.4, 1.1.8, 1.2.2, 1.2.3.1, 1.2.3.2,
                    1.3.0, 1.3.1.0 (and 16 others)
Versions installed: [ Not installed ]
Homepage:      [ Not specified ]
Bug reports:   https://github.com/hvr/regex-tdfa/issues
Description:   This package provides a pure Haskell \"Tagged\" DFA regex
               engine for <//hackage.haskell.org/package/regex-base
               regex-base>. This implementation was inspired by the
               algorithm (and Master's thesis) behind the regular expression
               library known as <https://github.com/laurikari/tre/ TRE or
               libtre>.

               Please consult the "Text.Regex.TDFA" module for API
               documentation including a tutorial with usage examples; see
               also <https://wiki.haskell.org/Regular_expressions> for
               general information about regular expression support in
               Haskell.
Category:      Text
License:       BSD3
Author:        Christopher Kuklewicz
Maintainer:    hvr@gnu.org
Source repo:   https://github.com/hvr/regex-tdfa.git
Flags:         force-o2
Dependencies:  array >=0.4 && <0.6, base >=4.5 && <4.14,
               bytestring >=0.9.2 && <0.11, containers >=0.4.2 && <0.7,
               mtl >=2.1.3 && <2.3, parsec ==3.1.*, regex-base ==0.94.*,
               text >=1.2.3 && <1.3, fail ==4.9.*,
               semigroups >=0.18 && <0.20, regex-tdfa -any, array -any,
               base -any, bytestring -any, containers -any, filepath -any,
               mtl -any, regex-base -any, text -any,
               directory >=1.1.0 && <1.4, filepath >=1.3.0 && <1.5,
               utf8-string >=1.0.1 && <1.1, fail -any, semigroups -any
Cached:        Yes
Modules:
    Data.IntMap.CharMap2
    Data.IntMap.EnumMap2
    Data.IntSet.EnumSet2
    Text.Regex.TDFA
    Text.Regex.TDFA.ByteString
    Text.Regex.TDFA.ByteString.Lazy
    Text.Regex.TDFA.Common
    Text.Regex.TDFA.CorePattern
    Text.Regex.TDFA.IntArrTrieSet
    Text.Regex.TDFA.NewDFA.Engine
    Text.Regex.TDFA.NewDFA.Engine_FA
    Text.Regex.TDFA.NewDFA.Engine_NC
    Text.Regex.TDFA.NewDFA.Engine_NC_FA
    Text.Regex.TDFA.NewDFA.MakeTest
    Text.Regex.TDFA.NewDFA.Tester
    Text.Regex.TDFA.NewDFA.Uncons
    Text.Regex.TDFA.Pattern
    Text.Regex.TDFA.ReadRegex
    Text.Regex.TDFA.Sequence
    Text.Regex.TDFA.String
    Text.Regex.TDFA.TDFA
    Text.Regex.TDFA.TNFA
    Text.Regex.TDFA.Text
    Text.Regex.TDFA.Text.Lazy

Команды Info показывают, что ни один пакет не был установлен.

Я также пробовал cabal v1-install и cabal v2-install, а также устаревший cabal install, то же самое.

Однако когда я использую cabal для установки и настройки пакета и перечисляю эти пакеты в файле .cabal в разделе build-depends: и с помощью cabal создайте исполняемый файл, он работает.

Почему на самом деле cabal не устанавливает эти пакеты с помощью команд установки, чтобы они работали в ghci?

...