Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/Network/Gitit/Feed.hs:152:12: error: Not in scope: data constructor ‘Both’ #657

Closed
glycerine opened this issue Jun 19, 2020 · 2 comments

Comments

@glycerine
Copy link

newb here. I tried to install from cabal but no luck. Can anyone advise?

$ cabal update
Downloading the latest package list from hackage.haskell.org
$ cabal install gitit
Resolving dependencies...
Downloading Diff-0.4.0...
Downloading Glob-0.10.0...
Downloading HUnit-1.6.0.0...
Configuring Glob-0.10.0...
Downloading JuicyPixels-3.3.5...
Configuring Diff-0.4.0...
Configuring HUnit-1.6.0.0...
Configuring JuicyPixels-3.3.5...
Building Glob-0.10.0...
Building Diff-0.4.0...
Building HUnit-1.6.0.0...
Building JuicyPixels-3.3.5...
Installed Diff-0.4.0
Downloading aeson-1.4.1.0...
Installed HUnit-1.6.0.0
Downloading basement-0.0.11...
Configuring basement-0.0.11...
Configuring aeson-1.4.1.0...
Building basement-0.0.11...
Building aeson-1.4.1.0...
Installed Glob-0.10.0
Downloading bitarray-0.0.1.1...
Configuring bitarray-0.0.1.1...
Building bitarray-0.0.1.1...
Installed bitarray-0.0.1.1
Downloading cmark-gfm-0.2.1...
Configuring cmark-gfm-0.2.1...
Building cmark-gfm-0.2.1...
Installed cmark-gfm-0.2.1
Downloading cmdargs-0.10.20...
Configuring cmdargs-0.10.20...
Building cmdargs-0.10.20...
Installed basement-0.0.11
Downloading colour-2.3.5...
Configuring colour-2.3.5...
Building colour-2.3.5...
Installed cmdargs-0.10.20
Downloading cookie-0.4.5...
Configuring cookie-0.4.5...
Building cookie-0.4.5...
Installed cookie-0.4.5
Downloading cryptohash-md5-0.11.100.1...
Configuring cryptohash-md5-0.11.100.1...
Building cryptohash-md5-0.11.100.1...
Installed colour-2.3.5
Downloading cryptohash-sha1-0.11.100.1...
Configuring cryptohash-sha1-0.11.100.1...
Installed cryptohash-md5-0.11.100.1
Downloading extensible-exceptions-0.1.1.4...
Configuring extensible-exceptions-0.1.1.4...
Building cryptohash-sha1-0.11.100.1...
Building extensible-exceptions-0.1.1.4...
Installed extensible-exceptions-0.1.1.4
Downloading hourglass-0.2.12...
Configuring hourglass-0.2.12...
Installed cryptohash-sha1-0.11.100.1
Downloading hslogger-1.2.12...
Configuring hslogger-1.2.12...
Building hourglass-0.2.12...
Building hslogger-1.2.12...
Installed hslogger-1.2.12
Downloading hslua-1.0.3.2...
Configuring hslua-1.0.3.2...
Building hslua-1.0.3.2...
Installed hourglass-0.2.12
Downloading html-1.0.1.2...
Configuring html-1.0.1.2...
Building html-1.0.1.2...
Installed html-1.0.1.2
Downloading http-types-0.12.3...
Configuring http-types-0.12.3...
Building http-types-0.12.3...
Installed http-types-0.12.3
Downloading hxt-charproperties-9.4.0.0...
Configuring hxt-charproperties-9.4.0.0...
Building hxt-charproperties-9.4.0.0...
Installed hslua-1.0.3.2
Downloading microlens-0.4.11.2...
Configuring microlens-0.4.11.2...
Building microlens-0.4.11.2...
Installed hxt-charproperties-9.4.0.0
Downloading mime-types-0.1.0.9...
Configuring mime-types-0.1.0.9...
Building mime-types-0.1.0.9...
Installed microlens-0.4.11.2
Downloading network-info-0.2.0.10...
Configuring network-info-0.2.0.10...
Building network-info-0.2.0.10...
Installed network-info-0.2.0.10
Downloading parsec-3.1.14.0...
Configuring parsec-3.1.14.0...
Building parsec-3.1.14.0...
Installed aeson-1.4.1.0
Downloading regex-base-0.94.0.0...
Configuring regex-base-0.94.0.0...
Building regex-base-0.94.0.0...
Installed mime-types-0.1.0.9
Downloading sendfile-0.7.11.1...
Configuring sendfile-0.7.11.1...
Installed regex-base-0.94.0.0
Downloading splitmix-0.0.5...
Configuring splitmix-0.0.5...
Building sendfile-0.7.11.1...
Building splitmix-0.0.5...
Installed sendfile-0.7.11.1
Downloading system-filepath-0.4.14...
Installed splitmix-0.0.5
Downloading tagsoup-0.14.8...
Configuring system-filepath-0.4.14...
Configuring tagsoup-0.14.8...
Building tagsoup-0.14.8...
Building system-filepath-0.4.14...
Installed parsec-3.1.14.0
Downloading th-lift-0.8.1...
Configuring th-lift-0.8.1...
Building th-lift-0.8.1...
Installed th-lift-0.8.1
Downloading threads-0.5.1.6...
Configuring threads-0.5.1.6...
Installed system-filepath-0.4.14
Downloading transformers-base-0.4.4...
Configuring transformers-base-0.4.4...
Building threads-0.5.1.6...
Building transformers-base-0.4.4...
Installed threads-0.5.1.6
Downloading unliftio-core-0.2.0.1...
Installed transformers-base-0.4.4
Downloading url-2.1.3...
Configuring unliftio-core-0.2.0.1...
Configuring url-2.1.3...
Building unliftio-core-0.2.0.1...
Building url-2.1.3...
Installed unliftio-core-0.2.0.1
Downloading vector-algorithms-0.8.0.3...
Configuring vector-algorithms-0.8.0.3...
Building vector-algorithms-0.8.0.3...
Installed url-2.1.3
Downloading xml-1.3.14...
Configuring xml-1.3.14...
Building xml-1.3.14...
Installed tagsoup-0.14.8
Downloading xml-types-0.3.7...
Configuring xml-types-0.3.7...
Building xml-types-0.3.7...
Installed xml-1.3.14
Downloading unicode-transforms-0.3.6...
Configuring unicode-transforms-0.3.6...
Building unicode-transforms-0.3.6...
Installed xml-types-0.3.7
Downloading socks-0.6.1...
Configuring socks-0.6.1...
Building socks-0.6.1...
Installed JuicyPixels-3.3.5
Downloading memory-0.15.0...
Configuring memory-0.15.0...
Building memory-0.15.0...
Installed socks-0.6.1
Downloading ansi-terminal-0.10.3...
Configuring ansi-terminal-0.10.3...
Building ansi-terminal-0.10.3...
Installed memory-0.15.0
Downloading hslua-module-text-0.2.1...
Installed vector-algorithms-0.8.0.3
Downloading hxt-unicode-9.0.2.4...
Configuring hslua-module-text-0.2.1...
Configuring hxt-unicode-9.0.2.4...
Building hslua-module-text-0.2.1...
Building hxt-unicode-9.0.2.4...
Installed ansi-terminal-0.10.3
Downloading uuid-1.3.13...
Configuring uuid-1.3.13...
Building uuid-1.3.13...
Installed hslua-module-text-0.2.1
Downloading ipynb-0.1.0.1...
Configuring ipynb-0.1.0.1...
Building ipynb-0.1.0.1...
Installed hxt-unicode-9.0.2.4
Downloading aeson-pretty-0.8.8...
Configuring aeson-pretty-0.8.8...
Installed uuid-1.3.13
Downloading regex-posix-0.96.0.0...
Configuring regex-posix-0.96.0.0...
Building aeson-pretty-0.8.8...
Building regex-posix-0.96.0.0...
Installed aeson-pretty-0.8.8
Downloading regex-pcre-builtin-0.95.1.2.8.43...
Configuring regex-pcre-builtin-0.95.1.2.8.43...
Building regex-pcre-builtin-0.95.1.2.8.43...
Installed regex-posix-0.96.0.0
Downloading QuickCheck-2.13.2...
Configuring QuickCheck-2.13.2...
Building QuickCheck-2.13.2...
Installed ipynb-0.1.0.1
Downloading network-uri-2.6.3.0...
Configuring network-uri-2.6.3.0...
Building network-uri-2.6.3.0...
Installed unicode-transforms-0.3.6
Downloading json-0.9.3...
Configuring json-0.9.3...
Building json-0.9.3...
Installed network-uri-2.6.3.0
Downloading hxt-regex-xmlschema-9.2.0.3...
Configuring hxt-regex-xmlschema-9.2.0.3...
Building hxt-regex-xmlschema-9.2.0.3...
Installed json-0.9.3
Downloading haddock-library-1.7.0...
Configuring haddock-library-1.7.0...
Building haddock-library-1.7.0...
Installed hxt-regex-xmlschema-9.2.0.3
Downloading doctemplates-0.2.2.1...
Configuring doctemplates-0.2.2.1...
Building doctemplates-0.2.2.1...
Installed regex-pcre-builtin-0.95.1.2.8.43
Downloading HsYAML-0.1.2.0...
Configuring HsYAML-0.1.2.0...
Building HsYAML-0.1.2.0...
Installed doctemplates-0.2.2.1
Downloading HStringTemplate-0.8.7...
Configuring HStringTemplate-0.8.7...
Installed QuickCheck-2.13.2
Downloading th-lift-instances-0.1.17...
Configuring th-lift-instances-0.1.17...
Building HStringTemplate-0.8.7...
Building th-lift-instances-0.1.17...
Installed haddock-library-1.7.0
Downloading monad-control-1.0.2.3...
Configuring monad-control-1.0.2.3...
Installed th-lift-instances-0.1.17
Downloading typed-process-0.2.6.0...
Configuring typed-process-0.2.6.0...
Building monad-control-1.0.2.3...
Building typed-process-0.2.6.0...
Installed monad-control-1.0.2.3
Downloading resourcet-1.2.4.1...
Configuring resourcet-1.2.4.1...
Building resourcet-1.2.4.1...
Installed typed-process-0.2.6.0
Downloading filestore-0.6.4...
Configuring filestore-0.6.4...
Building filestore-0.6.4...
Installed resourcet-1.2.4.1
Downloading pem-0.2.4...
Configuring pem-0.2.4...
Building pem-0.2.4...
Installed HStringTemplate-0.8.7
Downloading cryptonite-0.26...
Configuring cryptonite-0.26...
Installed pem-0.2.4
Downloading asn1-types-0.3.4...
Configuring asn1-types-0.3.4...
Building cryptonite-0.26...
Building asn1-types-0.3.4...
Installed HsYAML-0.1.2.0
Downloading mono-traversable-1.0.15.1...
Configuring mono-traversable-1.0.15.1...
Building mono-traversable-1.0.15.1...
Installed filestore-0.6.4
Downloading regex-compat-0.95.2.0...
Configuring regex-compat-0.95.2.0...
Building regex-compat-0.95.2.0...
Installed asn1-types-0.3.4
Downloading xss-sanitize-0.3.6...
Configuring xss-sanitize-0.3.6...
Building xss-sanitize-0.3.6...
Installed regex-compat-0.95.2.0
Downloading http-client-0.6.4.1...
Configuring http-client-0.6.4.1...
Building http-client-0.6.4.1...
Installed xss-sanitize-0.3.6
Downloading HTTP-4000.3.14...
Configuring HTTP-4000.3.14...
Building HTTP-4000.3.14...
Installed http-client-0.6.4.1
Downloading hxt-9.3.1.18...
Configuring hxt-9.3.1.18...
Building hxt-9.3.1.18...
Installed HTTP-4000.3.14
Downloading pandoc-types-1.17.6.1...
Configuring pandoc-types-1.17.6.1...
Building pandoc-types-1.17.6.1...
Installed mono-traversable-1.0.15.1
Downloading uri-bytestring-0.3.2.2...
Configuring uri-bytestring-0.3.2.2...
Building uri-bytestring-0.3.2.2...
Installed uri-bytestring-0.3.2.2
Downloading happstack-server-7.5.4...
Configuring happstack-server-7.5.4...
Building happstack-server-7.5.4...
Installed pandoc-types-1.17.6.1
Downloading asn1-encoding-0.9.6...
Configuring asn1-encoding-0.9.6...
Building asn1-encoding-0.9.6...
Installed asn1-encoding-0.9.6
Downloading MissingH-1.4.0.1...
Configuring MissingH-1.4.0.1...
Building MissingH-1.4.0.1...
Installed MissingH-1.4.0.1
Downloading recaptcha-0.1.0.4...
Configuring recaptcha-0.1.0.4...
Building recaptcha-0.1.0.4...
Installed recaptcha-0.1.0.4
Downloading conduit-1.3.2...
Configuring conduit-1.3.2...
Building conduit-1.3.2...
Installed happstack-server-7.5.4
Downloading uri-bytestring-aeson-0.1.0.8...
Configuring uri-bytestring-aeson-0.1.0.8...
Building uri-bytestring-aeson-0.1.0.8...
Installed cryptonite-0.26
Downloading texmath-0.11.3...
Installed uri-bytestring-aeson-0.1.0.8
Downloading asn1-parse-0.9.5...
Configuring asn1-parse-0.9.5...
Configuring texmath-0.11.3...
Building asn1-parse-0.9.5...
Building texmath-0.11.3...
Installed asn1-parse-0.9.5
Downloading ConfigFile-1.1.4...
Configuring ConfigFile-1.1.4...
Building ConfigFile-1.1.4...
Installed ConfigFile-1.1.4
Downloading x509-1.7.5...
Configuring x509-1.7.5...
Building x509-1.7.5...
Installed hxt-9.3.1.18
Downloading skylighting-core-0.7.7...
Configuring skylighting-core-0.7.7...
Building skylighting-core-0.7.7...
Installed conduit-1.3.2
Downloading conduit-extra-1.3.5...
Configuring conduit-extra-1.3.5...
Building conduit-extra-1.3.5...
Installed x509-1.7.5
Downloading x509-store-1.6.7...
Configuring x509-store-1.6.7...
Building x509-store-1.6.7...
Installed x509-store-1.6.7
Downloading x509-validation-1.6.11...
Configuring x509-validation-1.6.11...
Building x509-validation-1.6.11...
Installed conduit-extra-1.3.5
Downloading x509-system-1.6.6...
Configuring x509-system-1.6.6...
Building x509-system-1.6.6...
Installed x509-validation-1.6.11
Downloading xml-conduit-1.8.0.1...
Configuring xml-conduit-1.8.0.1...
Building xml-conduit-1.8.0.1...
Installed x509-system-1.6.6
Downloading tls-1.5.4...
Configuring tls-1.5.4...
Building tls-1.5.4...
Installed xml-conduit-1.8.0.1
Downloading feed-1.0.1.0...
Configuring feed-1.0.1.0...
Building feed-1.0.1.0...
Installed skylighting-core-0.7.7
Downloading skylighting-0.7.7...
Configuring skylighting-0.7.7...
Building skylighting-0.7.7...
Installed feed-1.0.1.0
Installed tls-1.5.4
Downloading connection-0.3.1...
Configuring connection-0.3.1...
Building connection-0.3.1...
Installed skylighting-0.7.7
Installed connection-0.3.1
Downloading http-client-tls-0.3.5.3...
Configuring http-client-tls-0.3.5.3...
Building http-client-tls-0.3.5.3...
Installed texmath-0.11.3
Installed http-client-tls-0.3.5.3
Downloading pandoc-2.7.2...
Downloading http-conduit-2.3.7.3...
Configuring http-conduit-2.3.7.3...
Building http-conduit-2.3.7.3...
Configuring pandoc-2.7.2...
Building pandoc-2.7.2...
Installed http-conduit-2.3.7.3
Downloading hoauth2-1.8.9...
Configuring hoauth2-1.8.9...
Building hoauth2-1.8.9...
Installed hoauth2-1.8.9
Installed pandoc-2.7.2
Downloading gitit-0.12.3.2...
Configuring gitit-0.12.3.2...
Building gitit-0.12.3.2...
Failed to install gitit-0.12.3.2
Build log ( /Users/jaten/.cabal/logs/ghc-8.2.2/gitit-0.12.3.2-7CdLGb1nifvBwu0GL6wEtb.log ):
cabal: Entering directory '/var/folders/6s/zdc0hvvx7kqcglg5yqm3kl4r0000gn/T/cabal-tmp-69068/gitit-0.12.3.2'
Configuring gitit-0.12.3.2...
Preprocessing executable 'expireGititCache' for gitit-0.12.3.2..
Building executable 'expireGititCache' for gitit-0.12.3.2..
[1 of 1] Compiling Main             ( expireGititCache.hs, dist/build/expireGititCache/expireGititCache-tmp/Main.o )
Linking dist/build/expireGititCache/expireGititCache ...
Preprocessing library for gitit-0.12.3.2..
Building library for gitit-0.12.3.2..
[ 1 of 22] Compiling Network.Gitit.Compat.Except ( src/Network/Gitit/Compat/Except.hs, dist/build/Network/Gitit/Compat/Except.o )
[ 2 of 22] Compiling Network.Gitit.Rpxnow ( src/Network/Gitit/Rpxnow.hs, dist/build/Network/Gitit/Rpxnow.o )
[ 3 of 22] Compiling Network.Gitit.Server ( src/Network/Gitit/Server.hs, dist/build/Network/Gitit/Server.o )
[ 4 of 22] Compiling Network.Gitit.Types ( src/Network/Gitit/Types.hs, dist/build/Network/Gitit/Types.o )

src/Network/Gitit/Types.hs:336:1: warning: [-Worphans]
    Orphan instance: instance FromData SessionKey
    To avoid this
        move the instance declaration to the module of the class or of the type, or
        wrap the type with a newtype and declare the instance on the new type.
    |
336 | instance FromData SessionKey where
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

src/Network/Gitit/Types.hs:373:1: warning: [-Worphans]
    Orphan instance: instance FromReqURI [String]
    To avoid this
        move the instance declaration to the module of the class or of the type, or
        wrap the type with a newtype and declare the instance on the new type.
    |
373 | instance FromReqURI [String] where
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
[ 5 of 22] Compiling Network.Gitit.State ( src/Network/Gitit/State.hs, dist/build/Network/Gitit/State.o )
[ 6 of 22] Compiling Network.Gitit.Plugins ( src/Network/Gitit/Plugins.hs, dist/build/Network/Gitit/Plugins.o )

src/Network/Gitit/Plugins.hs:41:5: warning: [-Wdeprecations]
    In the use of ‘defaultCleanupHandler’ (imported from GHC):
    Deprecated: "Cleanup is now done by runGhc/runGhcT"
   |
41 |     defaultCleanupHandler dflags $ do
   |     ^^^^^^^^^^^^^^^^^^^^^
[ 7 of 22] Compiling Network.Gitit.Framework ( src/Network/Gitit/Framework.hs, dist/build/Network/Gitit/Framework.o )
[ 8 of 22] Compiling Network.Gitit.Cache ( src/Network/Gitit/Cache.hs, dist/build/Network/Gitit/Cache.o )
[ 9 of 22] Compiling Network.Gitit.Util ( src/Network/Gitit/Util.hs, dist/build/Network/Gitit/Util.o )
[10 of 22] Compiling Network.Gitit.Page ( src/Network/Gitit/Page.hs, dist/build/Network/Gitit/Page.o )
[11 of 22] Compiling Network.Gitit.Authentication.Github ( src/Network/Gitit/Authentication/Github.hs, dist/build/Network/Gitit/Authentication/Github.o )
[12 of 22] Compiling Paths_gitit      ( dist/build/autogen/Paths_gitit.hs, dist/build/Paths_gitit.o )
[13 of 22] Compiling Network.Gitit.Feed ( src/Network/Gitit/Feed.hs, dist/build/Network/Gitit/Feed.o )

src/Network/Gitit/Feed.hs:150:12: error:
    Not in scope: data constructor ‘First’
    Perhaps you want to add ‘First’ to the import list in the import of
    ‘Data.FileStore.Generic’ (src/Network/Gitit/Feed.hs:39:1-46).
    |
150 | diffLines (First x) = map (enTag1 "s" . enText) x
    |            ^^^^^

src/Network/Gitit/Feed.hs:151:12: error:
    Not in scope: data constructor ‘Second’
    Perhaps you want to add ‘Second’ to the import list
    in the import of ‘Data.FileStore.Generic’
    (src/Network/Gitit/Feed.hs:39:1-46).
    |
151 | diffLines (Second x) = map (enTag1 "b" . enText) x
    |            ^^^^^^

src/Network/Gitit/Feed.hs:152:12: error:
    Not in scope: data constructor ‘Both’
    Perhaps you want to add ‘Both’ to the import list in the import of
    ‘Data.FileStore.Generic’ (src/Network/Gitit/Feed.hs:39:1-46).
    |
152 | diffLines (Both x _) = map enText x
    |            ^^^^
cabal: Leaving directory '/var/folders/6s/zdc0hvvx7kqcglg5yqm3kl4r0000gn/T/cabal-tmp-69068/gitit-0.12.3.2'
Updating documentation index
/Users/jaten/Library/Haskell/share/doc/x86_64-osx-ghc-8.2.2/index.html
cabal: Error: some packages failed to install:
gitit-0.12.3.2-7CdLGb1nifvBwu0GL6wEtb failed during the building phase. The
exception was:
ExitFailure 1
$

@jgm
Copy link
Owner

jgm commented Jun 20, 2020

Try with the latest version of gitit, 0.13.0.0?
For some reason cabal is trying to install an earlier version.
I'd also recommend using a recent version of cabal (preferably 3.x).

@glycerine
Copy link
Author

the stack based build did better, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants