Skip to content

Commit

Permalink
structured types
Browse files Browse the repository at this point in the history
Summary:
See linked task.

Addressing user comments specifically interested in shapes.  A few cases aren't handled yet (e.g. refinement, function types). Leaving them for follow up.

Regenerated schema using
```
buck2 run fbcode//glean/schema/gen:gen-schema -- --ocaml fbcode/hphp/hack/src/typing/write_symbol_info/glean/ --dir ~/fbsource/fbcode/glean/schema/source --schemas builtin,fbthrift,gencode,hack,src
```
This uses the changes from D62994929, `hack.ml` looks reasonable.

Reviewed By: donsbot

Differential Revision: D62861952

fbshipit-source-id: f6ab1e6de052646935ae15ca0634213507c93a52
  • Loading branch information
Philippe Bidinger authored and facebook-github-bot committed Sep 20, 2024
1 parent f18da76 commit 553cb15
Show file tree
Hide file tree
Showing 3 changed files with 1,765 additions and 1,611 deletions.
2 changes: 1 addition & 1 deletion glean/glass/Glean/Glass/Pretty/Hack.hs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ relSpansToAbs byteSpans = snd $ List.foldl' f (0, []) byteSpans
-- default.
toTypeAndXRefs :: Maybe Hack.Type -> Maybe Hack.TypeInfo -> (HackType, XRefs)
toTypeAndXRefs type_ typeInfo = case typeInfo of
(Just (Hack.TypeInfo _ (Just (Hack.TypeInfo_key displayType hackXRefs)))) ->
(Just (Hack.TypeInfo _ (Just (Hack.TypeInfo_key displayType hackXRefs _)))) ->
let f (Hack.XRef declaration ranges) = case declaration of
Hack.XRefTarget_declaration decl ->
Just ((\x -> (decl, x)) <$> relSpansToAbs ranges)
Expand Down
Loading

0 comments on commit 553cb15

Please sign in to comment.