Text.Regex.Posix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Text.Regex.Posix

Alexander Chen


Hi,

cabal install regex-posix

runs without issue.


added it to cabal dependencies:



name:                data-regex
version:             0.1.0.0
-- synopsis:
-- description:
homepage:            https://github.com/githubuser/data-regex#readme
license:             BSD3
license-file:        LICENSE
author:              Alexander Chen
maintainer:          [hidden email]
copyright:           2020 Alexander Chen
category:            regex
build-type:          Simple
cabal-version:       >=1.10
extra-source-files:  README.md

executable data-regex
  hs-source-dirs:      src
  main-is:             Main.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.7 && < 5, regex-posix 




Then I do:

stack install regex-posix

error>
WARNING: Ignoring regex-posix's bounds on base (<0 && >=4.3 && <4.15); using base-4.13.0.0.
Reason: trusting snapshot over cabal file dependency information.
regex-posix> configure
regex-posix> Configuring regex-posix-0.96.0.0...
regex-posix> build
regex-posix> Preprocessing library for regex-posix-0.96.0.0..
regex-posix> C:\Users\achen\AppData\Local\Temp\stack-e2b99a8a9eb45aea\regex-posix-0.96.0.0\Wrap.hsc:96:10: fatal error: regex.h: No such file or directory
regex-posix> compilation terminated.
regex-posix> compiling .stack-work\dist\29cc6475\build\Text\Regex\Posix\Wrap_hsc_make.c failed (exit code 1)
regex-posix> command was: C:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\../mingw/bin\gcc.exe -c .stack-work\dist\29cc6475\build\Text\Regex\Posix\Wrap_hsc_make.c -o .stack-work\dist\29cc6475\build\Text\Regex\Posix\Wrap_hsc_make.o -D__GLASGOW_HASKELL__=808 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Icbits -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -I.stack-work\dist\29cc6475\build\cbits -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -I.stack-work\dist\29cc6475\build\autogen -I.stack-work\dist\29cc6475\build\global-autogen -include .stack-work\dist\29cc6475\build\autogen\cabal_macros.h -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\bytestring-0.10.10.0\include -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\base-4.13.0.0\include -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib\integer-gmp-1.0.2.0\include -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3\lib/include -IC:\Users\achen\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.3/lib/include/

--  While building package regex-posix-0.96.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.0.1.0_ghc-8.8.3.exe --builddir=.stack-work\dist\29cc6475 build --ghc-options " -fdiagnostics-color=always"      
    Process exited with code: ExitFailure 1
Progress 1/2

=========================================================================================================================================================================================

I also get an error in my main(but seems related):

module Main where

import Text.Regex.Posix

main :: IO ()
main = do
  let str1 = "one fish two fish red fish blue fish"
  let str2 = "The quick brown fox jumps over the lazy dog."
  print str1 =~ "one" ::Bool


What am I doing wrong?

best,

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners