mvoidex / hdocs Goto Github PK
View Code? Open in Web Editor NEWHaskell docs tool
License: BSD 3-Clause "New" or "Revised" License
Haskell docs tool
License: BSD 3-Clause "New" or "Revised" License
Hi,
my current setup is:
However while all (most?) commands I've used use the gtk3 from the active hsenv, hdocs is failing while trying to use the system ones (effectively ignoring the hsenv):
> ghc-pkg list gtk
.../.hsenv/ghc_pkg_db
> ghc-pkg list gtk3
.../.hsenv/ghc_pkg_db
gtk3-0.13.0.0
> hdocs Graphics.UI.Gtk
{"error":"Module Graphics.UI.Gtk found in several packages: gtk3-0.12.5.7-154c93ec30b1532a93865e877c6b3a4e, gtk-0.12.5.7-7e102cbaeb1c160e713dabe1677494d8"}
As the two versions I have live outside of the active hsenv, is there a way to ignore them and use gtk3-0.13.0.0
?
Thanks!
Resolving dependencies...
Configuring hdocs-0.4.2.0...
Building hdocs-0.4.2.0...
Preprocessing library hdocs-0.4.2.0...
[1 of 3] Compiling HDocs.Base ( src/HDocs/Base.hs, dist/build/HDocs/Base.o )
[2 of 3] Compiling HDocs.Haddock ( src/HDocs/Haddock.hs, dist/build/HDocs/Haddock.o )
[3 of 3] Compiling HDocs.Module ( src/HDocs/Module.hs, dist/build/HDocs/Module.o )
In-place registering hdocs-0.4.2.0...
Preprocessing executable 'hdocs' for hdocs-0.4.2.0...
[1 of 1] Compiling Main ( tools/hdocs.hs, dist/build/hdocs/hdocs-tmp/Main.o )
Linking dist/build/hdocs/hdocs ...
Preprocessing test suite 'test' for hdocs-0.4.2.0...
[1 of 1] Compiling Main ( tests/Test.hs, dist/build/test/test-tmp/Main.o )
tests/Test.hs:19:26:
Couldn't match type ‘transformers-0.4.2.0:Control.Monad.Trans.Except.ExceptT
String IO’
with ‘ErrorT String IO’
Expected type: ErrorT String IO (M.Map String String)
Actual type: transformers-0.4.2.0:Control.Monad.Trans.Except.ExceptT
String IO (M.Map String String)
In a stmt of a 'do' block:
sdocs <- fmt $ liftM snd $ readSource [] "tests/HelpTest.hs"
In the expression:
do { sdocs <- fmt $ liftM snd $ readSource [] "tests/HelpTest.hs";
check
"Documentation for file: Test.hs, test"
(M.lookup "test" sdocs
== Just "This is test function with documentation");
edocs <- fmt $ moduleDocs [] "Prelude";
check
"Documentation for installed module: Prelude.null"
(M.lookup "null" edocs == Just "Test whether a list is empty.") }
In an equation for ‘main'’:
main'
= do { sdocs <- fmt
$ liftM snd $ readSource [] "tests/HelpTest.hs";
check
"Documentation for file: Test.hs, test"
(M.lookup "test" sdocs
== Just "This is test function with documentation");
edocs <- fmt $ moduleDocs [] "Prelude";
.... }
where
check str p = unless p $ throwError str
fmt = liftM formatDocs
tests/Test.hs:22:26:
Couldn't match expected type ‘ErrorT
String IO (M.Map [Char] [Char])’
with actual type ‘transformers-0.4.2.0:Control.Monad.Trans.Except.ExceptT
String IO (M.Map String String)’
In a stmt of a 'do' block: edocs <- fmt $ moduleDocs [] "Prelude"
In the expression:
do { sdocs <- fmt $ liftM snd $ readSource [] "tests/HelpTest.hs";
check
"Documentation for file: Test.hs, test"
(M.lookup "test" sdocs
== Just "This is test function with documentation");
edocs <- fmt $ moduleDocs [] "Prelude";
check
"Documentation for installed module: Prelude.null"
(M.lookup "null" edocs == Just "Test whether a list is empty.") }
In an equation for ‘main'’:
main'
= do { sdocs <- fmt
$ liftM snd $ readSource [] "tests/HelpTest.hs";
check
"Documentation for file: Test.hs, test"
(M.lookup "test" sdocs
== Just "This is test function with documentation");
edocs <- fmt $ moduleDocs [] "Prelude";
.... }
where
check str p = unless p $ throwError str
fmt = liftM formatDocs
When trying to install hsdev
or hdocs
separately this error occurs:
Resolving dependencies...
Configuring hdocs-0.5.1.0...
Building hdocs-0.5.1.0...
Failed to install hdocs-0.5.1.0
Build log ( /Users/username/.cabal/logs/hdocs-0.5.1.0.log ):
Configuring hdocs-0.5.1.0...
Building hdocs-0.5.1.0...
Preprocessing library hdocs-0.5.1.0...
[1 of 4] Compiling HDocs.Ghc.Compat ( src/HDocs/Ghc/Compat.hs, dist/build/HDocs/Ghc/Compat.o )
[2 of 4] Compiling HDocs.Base ( src/HDocs/Base.hs, dist/build/HDocs/Base.o )
src/HDocs/Base.hs:66:13:
Not in scope: data constructor ‘DocMathInline’
src/HDocs/Base.hs:67:13:
Not in scope: data constructor ‘DocMathDisplay’
cabal: Error: some packages failed to install:
hdocs-0.5.1.0 failed during the building phase. The exception was:
ExitFailure 1
Even after rm -rf ~/.ghc
and reinstall. The log file mentioned just contains the same message.
Looks like a file is missing from the sdist tarball
$ ./dist/build/test/test
tests/Test.hs:11:8:
Could not find module ‘HDocs.Module’
Use -v to see a list of the files searched for.
tests/Test.hs:12:8:
Could not find module ‘HDocs.Haddock’
Use -v to see a list of the files searched for.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.