aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Utils.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-06-17 15:04:59 -0400
committerBen Gamari <ben@smart-cactus.org>2020-06-17 16:09:07 -0400
commit02a1def8d147da88a0433726590f8586f486c760 (patch)
tree6aee10b7822ba5effbab1ee58d61660eef8ec816 /haddock-api/src/Haddock/Utils.hs
parente37911553bfe6804d3903f750261f758569b4a26 (diff)
Adapt Haddock to LinearTypes
See ghc/ghc!852.
Diffstat (limited to 'haddock-api/src/Haddock/Utils.hs')
-rw-r--r--haddock-api/src/Haddock/Utils.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs
index d72b9004..8346a477 100644
--- a/haddock-api/src/Haddock/Utils.hs
+++ b/haddock-api/src/Haddock/Utils.hs
@@ -90,6 +90,8 @@ import qualified System.Posix.Internals
import GHC.Utils.Monad ( MonadIO(..) )
+import GHC.Core.Multiplicity
+
--------------------------------------------------------------------------------
-- * Logging
@@ -200,7 +202,7 @@ restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ]
field_avail :: LConDeclField GhcRn -> Bool
field_avail (L _ (ConDeclField _ fs _ _))
= all (\f -> extFieldOcc (unLoc f) `elem` names) fs
- field_types flds = [ t | ConDeclField _ _ t _ <- flds ]
+ field_types flds = [ hsUnrestricted t | ConDeclField _ _ t _ <- flds ]
keep _ = Nothing