Skip to content

Format the codebase with ormolu/cabal format#358

Merged
tbagrel1 merged 2 commits intomasterfrom
tbagrel1/format-codebase
Jan 14, 2022
Merged

Format the codebase with ormolu/cabal format#358
tbagrel1 merged 2 commits intomasterfrom
tbagrel1/format-codebase

Conversation

@tbagrel1
Copy link
Copy Markdown
Member

No description provided.

@tbagrel1 tbagrel1 merged commit eedda42 into master Jan 14, 2022
@tbagrel1 tbagrel1 deleted the tbagrel1/format-codebase branch January 14, 2022 10:48
@andreabedini
Copy link
Copy Markdown
Contributor

andreabedini commented Jan 18, 2022

This PR hasremoved the comments in linear-base.cabal about doctests.

I belive this was accidental, so I am bringing this up here. I am not suggesting the comments should be reinstated. Removing comment is an unfortunate and well-know issue with cabal-format.

For reference this is the removed comment block

-- TODO: Uncomment below block and set 'build-type' to 'Custom' to enable
-- doctests once cabal-install 3.4 is released.
--
-- Longer story:
--
-- cabal-install has a piece of code[1] which injects a Cabal upper bound to
-- packages with custom Setup.hs's. And this happens after the overrides,
-- so the usual mechanisms of overriding upper bounds does not work.
--
-- GHC 9 comes with Cabal 3.4, which is above that bound. So, when using
-- GHC 9 with cabal-install 3.2; `build-type: Custom` causes another Cabal
-- library to be built, and that causes a strange type error ("expecting IO,
-- but got IO"), which I suspect because it conflicts with the existing boot
-- packages.
--
-- [1]: https://github.com/haskell/cabal/blob/d28c80acc69b9e7fa992a0b2b7fced937734b238/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1132-L1149

-- custom-setup
--  setup-depends:
--    base >= 4 && <5,
--    Cabal,
--    cabal-doctest
--
-- test-suite doctests
--   type:                 exitcode-stdio-1.0
--   hs-source-dirs:       test/
--   main-is:              Doctest.hs
--   build-depends:        base
--                       , doctest
--                       , linear-base
--   ghc-options:          -Wall -threaded
--   default-language:     Haskell2010

@tbagrel1
Copy link
Copy Markdown
Member Author

Nice catch! If anyone thinks that these comments should be reinstated, please let me know.

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

Successfully merging this pull request may close these issues.

3 participants