diff options
author | Cale Gibbard <cgibbard@gmail.com> | 2020-07-30 14:00:19 -0400 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2020-11-25 23:18:35 -0500 |
commit | acf235d607879eb9542127eb0ddb42a250b5b850 (patch) | |
tree | ab41b4f5840cd6a7631e4f2b2c94da010e88e614 /haddock-api/src/Haddock/Utils.hs | |
parent | 8d260690b53f2fb6b54ba78bd13d1400d9ebd395 (diff) |
Add type arguments to PrefixCon
Diffstat (limited to 'haddock-api/src/Haddock/Utils.hs')
-rw-r--r-- | haddock-api/src/Haddock/Utils.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Utils.hs b/haddock-api/src/Haddock/Utils.hs index aec7f9ab..8186e3b7 100644 --- a/haddock-api/src/Haddock/Utils.hs +++ b/haddock-api/src/Haddock/Utils.hs @@ -210,10 +210,10 @@ restrictCons names decls = [ L p d | L p (Just d) <- map (fmap keep) decls ] ConDeclGADT { con_g_args = args } -> restrict_gadt_args args where restrict_h98_args :: HsConDeclH98Details GhcRn -> Maybe (ConDecl GhcRn) - restrict_h98_args (PrefixCon _) = Just d + restrict_h98_args (PrefixCon _ _) = Just d restrict_h98_args (RecCon (L _ fields)) | all field_avail fields = Just d - | otherwise = Just (d { con_args = PrefixCon (field_types fields) }) + | otherwise = Just (d { con_args = PrefixCon noTypeArgs (field_types fields) }) -- if we have *all* the field names available, then -- keep the record declaration. Otherwise degrade to -- a constructor declaration. This isn't quite right, but |