I tried to install cabal-doctest-1, but I got a compilation error like this:
Resolving dependencies...
Configuring cabal-doctest-1.0.1...
Building cabal-doctest-1.0.1...
Failed to install cabal-doctest-1.0.1
Build log ( C:\Users\Podlovics Péter\AppData\Roaming\cabal\logs\cabal-doctest-1.0.1.log ):
Building cabal-doctest-1.0.1...
Preprocessing library cabal-doctest-1.0.1...
[1 of 1] Compiling Distribution.Extra.Doctest ( src\Distribution\Extra\Doctest.hs, dist\build\Distribution\Extra\Doctest.o )
src\Distribution\Extra\Doctest.hs:174:70: error:
* Could not deduce (Data.String.IsString
Distribution.Types.UnqualComponentName.UnqualComponentName)
arising from a use of `fromString'
from the context: GHC.Stack.Types.HasCallStack
bound by a type expected by the context:
GHC.Stack.Types.HasCallStack =>
Library -> ComponentLocalBuildInfo -> IO ()
at src\Distribution\Extra\Doctest.hs:(147,3)-(197,9)
or from: GHC.Stack.Types.HasCallStack
bound by a type expected by the context:
GHC.Stack.Types.HasCallStack =>
TestSuite -> ComponentLocalBuildInfo -> IO ()
at src\Distribution\Extra\Doctest.hs:(174,5)-(197,9)
* In the second argument of `(==)', namely
`fromString testSuiteName'
In the first argument of `when', namely
`(testName suite == fromString testSuiteName)'
In the expression:
when (testName suite == fromString testSuiteName)
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
cabal-doctest-1.0.1 failed during the building phase. The exception was:
ExitFailure 1
I tried hard-coding FlexibleContexts into the .hs file, but it didn't help. I have Cabal 1.24.
EDIT:
I updated to GHC 8.0.2, installed cabal-doctest-1, but the lnker doesn't seem to find it. Also I can't import DocTest into any module (you can find the searched locations below). Here's the linker error:
C:\cabal\cabal-master>cabal install distributive-0.5.2
Resolving dependencies...
Configuring distributive-0.5.2...
Failed to install distributive-0.5.2
Build log ( C:\Users\Podlovics Péter\AppData\Roaming\cabal\logs\distributive-0.5.2.log ):
cabal: Entering directory 'C:\Users\PODLOV~1\AppData\Local\Temp\cabal-tmp-13372\distributive-0.5.2'
cabal: Leaving directory 'C:\Users\PODLOV~1\AppData\Local\Temp\cabal-tmp-13372\distributive-0.5.2'
cabal: Error: some packages failed to install:
distributive-0.5.2 failed during the configure step. The exception was:
user error ('C:\Program Files\Haskell Platform\8.0.2\bin\ghc.exe' exited with
an error:
C:/Program Files/Haskell Platform/8.0.2/mingw/bin/ld.exe: cannot find
-lHScabal-doctest-1-3OH6xMXYfakDTTZ99VQuTb
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)
)
and here's the location list:
Failed to load interface for `DocTest'
Locations searched:
DocTest.hs
DocTest.lhs
DocTest.hsig
DocTest.lhsig
Thanks in advance