Skip to content

Commit

Permalink
re-enable haddock
Browse files Browse the repository at this point in the history
  • Loading branch information
kokobd committed Jul 4, 2022
1 parent 73652d7 commit a9893aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
3 changes: 1 addition & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ optional-packages: vendored/*/*.cabal
tests: true

package *
-- ghc 8.10 cannot build ghc-lib 9.2 with --haddock
-- ghc-options: -haddock
ghc-options: -haddock
test-show-details: direct

write-ghc-environment-files: never
Expand Down
6 changes: 0 additions & 6 deletions plugins/hls-hlint-plugin/hls-hlint-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ flag pedantic
default: False
manual: True

flag ghc-lib
default: True
manual: True
description: Use ghc-lib types (requires hlint to be built with ghc-lib)

library
exposed-modules: Ide.Plugin.Hlint
hs-source-dirs: src
Expand Down Expand Up @@ -61,7 +56,6 @@ library
, transformers
, unordered-containers
, apply-refact >=0.9.0.0
, ghc-lib
, ghc-lib-parser
, ghc-lib-parser-ex

Expand Down
27 changes: 11 additions & 16 deletions plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}

{-# OPTIONS_GHC -Wno-orphans #-}

#ifdef HLINT_ON_GHC_LIB
#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc_lib(x,y,z)
#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc_lib_parser(x,y,z)
#else
#define MIN_GHC_API_VERSION(x,y,z) MIN_VERSION_ghc(x,y,z)
#endif
Expand All @@ -44,8 +44,8 @@ import Data.Aeson.Types (FromJSON (.
Value (..))
import qualified Data.ByteString as BS
import Data.Default
import qualified Data.HashMap.Strict as Map
import Data.Hashable
import qualified Data.HashMap.Strict as Map
import Data.Maybe
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
Expand All @@ -67,14 +67,8 @@ import Development.IDE.GHC.Compat (DynFlags,
topDir,
wopt)
import qualified Development.IDE.GHC.Compat.Util as EnumSet
import "ghc-lib" GHC hiding
(DynFlags (..),
RealSrcSpan,
ms_hspp_opts)
import qualified "ghc-lib" GHC
#if MIN_GHC_API_VERSION(9,0,0)
import "ghc-lib-parser" GHC.Types.SrcLoc (BufSpan)
#endif
import "ghc-lib-parser" GHC.Types.SrcLoc hiding (RealSrcSpan)
import qualified "ghc-lib-parser" GHC.Types.SrcLoc as GHC
import "ghc-lib-parser" GHC.LanguageExtensions (Extension)
import Language.Haskell.GhclibParserEx.GHC.Driver.Session as GhclibParserEx (readExtension)
import System.FilePath (takeFileName)
Expand All @@ -89,7 +83,8 @@ import System.IO (IOMode (Wri
import System.IO.Temp
#else
import Development.IDE.GHC.Compat hiding
(setEnv, (<+>))
(setEnv,
(<+>))
import GHC.Generics (Associativity (LeftAssociative, NotAssociative, RightAssociative))
#if MIN_GHC_API_VERSION(9,2,0)
import Language.Haskell.GHC.ExactPrint.ExactPrint (deltaOptions)
Expand Down

0 comments on commit a9893aa

Please sign in to comment.